I am using Android Studio 2.0 Beta2, and i am trying to run old project that uses google maps api v1 (package com.google.android.maps) as *.jar file. To run this old project i need specify compileSdkVersion older than the last one (23). I used
compileSdkVersion 'Google Inc.:Google APIs:17'
But i got Error: Please select Android SDK error in Android Studio. How i can run this old project with older compileSdkVersion?
With Android Studio 2.1.3, I got this message when trying to launch my app.
I used the Module Settings dialog in AS to select another compile SDK version. Then I went back to the same dialog and chose Google API 17 again.
Then AS accepted the settings and could launch my app.
Really weird, as the contents of the build.gradle file is identical to what it was when I had the error message.
Also just sync the project from the tool bar
Open gradle.buld in your app module change versionCode or versionName and sync.
the easiest way is to:
Tools -> Android -> Sync Project with Gradle Files (Android Studio 3.0.1)
I just went to my Gradle button on the far right of the screen on the side and refreshed it and it worked for me.
I could fix the problem in my case you need to set the compileSdkVersion and the buildToolsVersion manually in the android studio. I don't know why the android astudio doesn't recognize the value from gradle.
So the steps are:
File/Project Structure/Flavors/
and set the buildToolsVersion and compileSdkVersion.
But you need to check, because the android studio puts this value at the end of the gradle file and if you have replicated this variables, the gradle build make an error. So I make cut and paste in here
and that's it!