After a successful import of an Eclipse-Android-Project into "Android Studio 1.4", I get the error
"Please select Android SDK"
when I click on the button to run the application in simulator, but I can't find any way of doing that.
This dialog opens when I click on "run":
This is the "project structure" dialog:
What should I do now?
by default, the "Android Studio IDE" will be installed in " C:\Program Files\Android\Android Studio ", and the "Android SDK" in " c:\Users\username\AppData\Local\Android\Sdk ".
What you need for SDK version is number in API level column of first table. This is how android section of build. gradle for app targeting Android 5.0 and newer should look like. Read more about targetSdkVersion , minSdkVersion and compileSdkVersion here.
To open the SDK Manager from Android Studio, click Tools > SDK Manager or click SDK Manager in the toolbar. If you're not using Android Studio, you can download tools using the sdkmanager command-line tool. When an update is available for a package you already have, a dash appears in the check box next to the package.
FIX FOR 3.1.2 OR NEWER VERSIONS
Some of my colleagues and I have faced the same issue on AS 3.1.2, but a simple Sync didn't help us. For us, the solution was a bit different:
EXTRA ADVICE IF YOU ARE FACING THIS ISSUE CONSTANTLY
Some of you are constantly facing this issue, and this "solution" fixes it only temporarily. At the time we started getting this error, we used gradle wrapper 4.6 and Android gradle plugin 3.1.0, but since then we went back to gradle 4.4 and we use it with the latest Android gradle plugin, and we haven't seen this issue since then.
I go to build.gradle
and click sync now. Then it worked.
Update :
File
-> Sync Project with Gradle Files
(Android Studio 3.1.1)
Tools
-> Android
-> Sync Project with Gradle Files
(Android Studio 3.0.1)
Or You can click on the icon from the toolbar.
This answer may not help works for later version as Android studio Team work on making the tool more better, the way to sync may be different in the next version of Android Studio.
COMMON WAY that may helps is try to sync project and then Invalidate Caches and Restart Android Studio.
Solution for Android Studio 3.1.2
[See below answer]
See Latest Android Studio version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With