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
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.
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.