On 11/1/2011 3:45 PM, Marc Petit-Huguenin wrote:
The method String.isEmpty() exists only since Java 1.6/Android API 9.
Thanks. That explains a lot. This was a recent change. I thought surely
I'd used that method before, but when I searched my entire project,
"isEmpty" was nowhere to be found!
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11/01/2011 12:40 PM, Doug Gordon wrote:
> Why in the world would my app crash with a "No such method" Java error on a
> statement like "if (!myString.isEmpty()" for a perfectly valid String object?
> If
> I simply change it to "if (myString.length(
Because String.isEmpty() didn't exist in 2.2. You can verify this by
looking at
http://developer.android.com/reference/java/lang/String.html#isEmpty() and
checking the "Filter by API level" option at the top.
You should use TextUtils.isEmpty() instead.
On Tue, Nov 1, 2011 at 12:40 PM, Doug Gordon
On Tue, Nov 1, 2011 at 3:40 PM, Doug Gordon wrote:
> Why in the world would my app crash with a "No such method" Java error on a
> statement like "if (!myString.isEmpty()" for a perfectly valid String
> object? If I simply change it to "if (myString.length() > 0)" it works just
> fine, so it's not
Why in the world would my app crash with a "No such method" Java error
on a statement like "if (!myString.isEmpty()" for a perfectly valid
String object? If I simply change it to "if (myString.length() > 0)" it
works just fine, so it's not like I'm not pointing to a valid String
object or anyth
5 matches
Mail list logo