can't call String.isEmpty() in android

前端 未结 7 535
一向
一向 2021-02-01 12:05

In my android application I can\'t use String.isEmpty() function which is situated in JDK 1.6. Android 2.1 lib doesn\'t have this function in java.lang

相关标签:
7条回答
  • 2021-02-01 12:34

    You have to upgrade android API to level 9, or use String.trim().length()==0 or String.equals("") instead, it should work for your android API level and your JDK version.

    0 讨论(0)
提交回复
热议问题