Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NoSuchMethodError: String.isEmpty [duplicate]

Tags:

java

android

Possible Duplicate:
Scala on Android: java.lang.NoSuchMethodError: java.lang.String.isEmpty

I've just released a new app on Android

I've optimized and obfuscated the code with proguard and tested extensively on my Android 2.3.3 phone. It works all right.

However, I keep getting really strange crash reports in the developer console, such as

java.lang.NoSuchMethodError: java.lang.String.isEmpty

Isn't String.isEmpty() a framework function on all Android devices?

like image 791
siamii Avatar asked Sep 27 '11 10:09

siamii


1 Answers

There is TextUtils.isEmpty("your_String");, but haven't seen about your_string.isEmpty()

I found that your_string.isEmpty() works after 2.2 as it was added in 2.3 GingerBread. But, before that you can use TextUtils.isEmpty()

like image 105
Lalit Poptani Avatar answered Sep 23 '22 12:09

Lalit Poptani