简体   繁体   中英

NoClassDefFoundError when running app on real device but not when running on an emulator

When I test my app on an emulator, (Nexus One API 22) it runs smoothly without fail. However, when I test the app on my own personal phone(Samsung Galaxy S5,Android version 5.0), it crashed with a NoClassDefFoundError. This error occurs at a part of the code where I am using an external library from a jar file.(jaudiotagger) Could it be that my own android phone does not have the jdk to support the library?

可能的问题是:您在模拟器(API 22)和带有android 5(API 21)的设备上未使用相同的API版本。

android API 22对应于android 5.1。然后您在手机中测试了该应用,即android 5.0。如果您的代码没有记错,也许是您所说的。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM