MultiDexApplication class in secondary dex file not found when using AndroidX

后端 未结 2 435
栀梦
栀梦 2021-01-02 21:06

I\'m using \'androidx.multidex:multidex:2.0.0\' and I\'m pointing to the MultiDexApplication class from the manifest using:



        
相关标签:
2条回答
  • 2021-01-02 21:37

    Use the multiDexKeepFile option to require that MultiDexApplication ends up in the main dex file.

    0 讨论(0)
  • 2021-01-02 21:44

    I had the same issue after migrating to AndroidX, though the application class in question was our custom Application class. I tried to clean the project from Android Studio but that didn't work, so eventually I manually removed all the build folders and for good measure did "Invalidate caches and restart" for Android studio as well and that seems to have done the trick for me at least.

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