On Tue, Nov 1, 2011 at 3:40 PM, Doug Gordon <[email protected]> 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 like I'm not pointing to a valid String object or > anything.
isEmpty() was added in API Level 9. > Interestingly, this only appears to happen when running it on my actual > Android 2.2 phone. It works OK on a V2.3.3 emulator. It is built with the > V2.3.3 SDK. What gives? Android 2.2 was API Level 8. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

