Class not found errors on blank Android Activity

后端 未结 2 584
既然无缘
既然无缘 2021-01-28 05:28

When I create a blank activity in Android Studio 2.0 and try to run it on API 16 it compiles without errors. When I run it on an emulator with API 23 it runs without errors. Whe

相关标签:
2条回答
  • 2021-01-28 06:03

    In Android Studio I went to File -> Project Structure -> Project.

    First I upgraded Gradle to 2.11 and the Android Plugin Version to 2.0.0. Next I synced the project and compiled it. The errors were still there.

    After this I downgraded the Android Plugin Version to 1.5.0.

    Now when I compile and run the project the errors are gone.

    0 讨论(0)
  • 2021-01-28 06:14

    It could be that your app is hitting the 64k methods limit. The issue would be seen from API level 21 and below for your app. Refer the document. It gives details about the problem and how you can use Multidex Support Library to resolve it for older versions of Android.

    Also this could be a quick solution of the problem.

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