This problem occurs when the unspecified on Project apps resolves to an APK archive which are not supported as a compilation dependency the case may be: created two m Odule, where one module relies on another module and causes the problem to occur;
If in Android studio, there are Modulea and Moduleb, we want Modulea to rely on Moduleb, run time may appear this problem, view the Moduleb of the build.gradle of dependency, inside can see:
Apply plugin: ' Com.android.application '
This sentence tells the Gradle will Moduleb compile called application, that is, APK, this is the problem;
Workaround: Replace the above sentence with the following:
Apply plugin: ' Com.android.library '
At this point, Gradle will compile called a library, that is, libraries, after running, if this problem occurs: Error:library projects cannot set ApplicationID. ApplicationID is set to ' package_name ' in Default Config., that is because a library does not allow the setting of ApplicationID, you need to BUILDE.GRADLE-ANDROID-DEFAULTC Onfig in the ApplicationID delete;
If we moduleb still need to generate APK, then we need to put the common code in a module, as a support library;
Android Studio Solution unspecified on Project app resolves to an APK archive which are not supported