本文介绍了的NoSuchMethodError:String.isEmpty的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
  Scala在Android:java.lang.NoSuchMethodError:java.lang.String.isEmpty

我刚刚发布了Android上一个新的应用程序

I've just released a new app on Android

我已经优化,混淆了code使用ProGuard和我的Andr​​oid 2.3.3手机广泛的测试。它的工作原理没事。

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

不是 String.isEmpty()在所有Android设备的框架功能?

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

推荐答案

TextUtils.isEmpty(your_String); ,但还没有看到关于 your_string.isEmpty()

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

我发现, your_string.isEmpty()后2.2 ,因为它是加入 2.3姜饼。但是,在此之前,你可以使用 TextUtils.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()

这篇关于的NoSuchMethodError:String.isEmpty的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 08:39