NoClassDefFoundError类存在,但是找不到

NoClassDefFoundError类存在,但是找不到,引用jar包或者第三方项目时
如:引用nineoldandroid-2.4.0-2.jar时,出现以下情况:

06-15 01:01:23.472: E/AndroidRuntime(2218): java.lang. NoClassDefFoundError: com.nineoldandroids.animation.AnimatorSet
06-15 01:01:23.472: E/AndroidRuntime(2218): at com.gitonway.lee.niftymodaldialogeffects.lib.effects.BaseEffects.(BaseEffects.java:46)
06-15 01:01:23.472: E/AndroidRuntime(2218): at com.gitonway.lee.niftymodaldialogeffects.lib.effects.SlideTop.(SlideTop.java:23)
06-15 01:01:23.472: E/AndroidRuntime(2218): at java.lang.Class.newInstanceImpl(Native Method)
06-15 01:01:23.472: E/AndroidRuntime(2218): at java.lang.Class.newInstance(Class.java:1319)

原因与解决方案

Right click on your project goto properties. Java Build Path. Choose Order export tab. Make sure that Android Private Libraries is selected. If you have referenced library project. do the same for the library project also. Clean and Build.

Also goto android sdk manager and check that you have the android sdk build tools installed. This many not be necessary bumake sure you have android build tools installed.


简而言之:勾选Build Path 下的Order and Export中对应jar包
NoClassDefFoundError类存在,但是找不到_第1张图片

你可能感兴趣的:(异常与问题集)