-----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() > 0)" it works just fine, so it's > not like I'm not pointing to a valid String object or anything. > > 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?
The method String.isEmpty() exists only since Java 1.6/Android API 9. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk6wTEwACgkQ9RoMZyVa61fD+gCdGHVsK5es6a7SmL/eIvM1PbEJ Y78An2ltBoh3UywysReYeUxDFgty8Ite =h2dt -----END PGP SIGNATURE----- -- 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

