NoClassDefFoundError for code in an Java library on Android

前端 未结 24 1609
梦如初夏
梦如初夏 2020-11-22 15:19

I am experiencing an error quite often among my users. The app crashes during startup. When the MainActivity is supposed to be loaded the VM apparently cannot find the class

24条回答
  •  北海茫月
    2020-11-22 15:47

    I have just figured out something with this error.

    Just make sure that the library jar file contains the compiled R class under android.support.v7.appcompat package and copy all the res in the v7 appcompat support "project" in your ANDROID_SDK_HOME/extras/android/support/v7/appcompat folder.

    I use Netbeans with the Android plugin and this solved my issue.

提交回复
热议问题