NoClassDefFoundError below SDK 21

后端 未结 3 1146
我寻月下人不归
我寻月下人不归 2020-11-30 02:47

I just experienced an awkward bug in my App.

On my Nexus 5/7, running android 5.0.1/5.0.2, everything works just fine. However if i try running the exact same code o

3条回答
  •  被撕碎了的回忆
    2020-11-30 03:16

    If you don't have/use Application class, you can put this:

    android:name="android.support.multidex.MultiDexApplication"
    

    Into your tag on AndroidManifest.xml

    If you already have implemented an Application class, @user2700475 + @sirvon responses are your best choice.

    Also obviously, you need to add the Gradle dependency:

    compile 'com.android.support:multidex:1.0.0'
    

    More info about 65k methods problem: https://developer.android.com/tools/building/multidex.html

提交回复
热议问题