1236

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 the simulator, I can't find any way of doing that.

This dialog opens when I click on "run":

This dialog opens up when I click on "run"

This is the "project structure" dialog:

Screenshot of the "project structure" dialog

What should I do now?

0

55 Answers 55

1
2
7

It helped me:

1. close project
2. remove .idea/ folder
3. select "import project (Gradle, Eclipse ADT, etc.)"

Environment:

Android Studio 3.1.3
OS Macos High Sierra 10.13.5

Another answers don't work for me.

0
6

After opening my project in Android Studio, I opened the App version of the build.gradle file, located in the Gradle Scripts folder of the Project. When I hovered my mouse pointer over the buildToolsVersion number, a tooltip popped, indicating that the version of Android Build Tools needed to be upgraded (see screenshot). I changed the value of the buildToolsVersion to the one identified by the error (27.0.2) and the problem was solved. The original error (Please select Android SDK) went away and the project compiled successfully, again. Although this solution was mentioned previously, the exact steps seemed to be missing, so hopefully this clears up any doubt. I guess the root cause for this problem is that a new version of the build tools were released but Android Studio did not trigger any notification to me, which would have indicated that I should manually fix this (since Android Studio does not seeem to have the ability to upgrade this build.gradle file internally), which leaves the onus on the user to find the problem and fix it.enter image description here

4

I had to bump kotlin version down to 1.2.31 from 1.2.41 for the run to be enabled. my environment: macOS - 10.13.4 (high sierra) AS version - 3.1.3

4

MY SOLUTION
This bug drove me crazy. No amount of syncing fixed it. I found that if I modified my module's build.gradle (by maybe adding a blank line or a space after a line), and then syncing that file, all is good.

0
3

You have to Select Build Tool Version from your project setting.

  1. Select Project App Folder

  2. Press F4 OR Right Click on Project App
    Folder and open Module Settings In The Properties tab select Build
    Tool Version from List

This will work on my side i hope it will help you.

3

Finally I reimported the project and it worked.

0
3

I get this error on Android Studio 4.0.1. Here is my solution: Go your build.gradle(Module: app) file and then update compileSdkVersion and buildToolsVersion.

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.2"
}
2

I just change the minSdKversion to 23 like:

andriod {
    compileSdKVersion 27
    defaultConfig {
          minSdKversion 23
    }
}
2

Click the File menu from the android studio.

File -> Settings -> System Settings -> Android SDK

File -> Settings -> System Settings -> Android SDK

2

My problem solved by setting NDK path in Android Studio.

File-> Project Structure->NDK Location.

enter image description here

1

You are using Google API SDK. This for some reason doesn't work anymore with the embedded java JDK / JRE.

Follow the solution I described here and set Android Studio JDK path to your local JDK (ex. OpenJDK)

1

There're bunch of answers, I tried to use one of those solutions by adding new line in build.gradle file, but it didn't work. Then I changed comileSdkVersion to another version and then changing it back to version I had. "Sync" button appeared. Pressing it, solved the issue for me.

1

I had the similar problem. I tried sync with gradle files and removed .idea folder but nothing works.

Here is what worked for me :

1.) Close android studio

2.) Remove c:/Users/{User}/.AndroidStudio{version} folder

Caution: It will remove all your installed plugins and settings. Try this if nothing works

1

I solved it with Android Studio 3.1.3:

  1. Open your problematic project in Android Studio. Click File > Export to Zip File.
  2. Close your problematic project (Exit Android Studio if necessary).
  3. In your OS, Delete your problematic project folder. Then extract the zip you just made previously.
  4. Back to Android Studio. On startup screen, click "Open an existing Android Project". Browse to the folder you just extracted.

That's it.

1

buildToolsVersion might be missing in your app's build.gradle

buildToolsVersion "26.0.3"

Add it like this enter image description here

1

In my case I had a double declaration of a dependency inside the project level build.gradle. Once I removed it, did a Gradle sync and it worked.

1

Work for me 1 File > close preject. 2 open an existing Android Studio project

1

MY SOLUTION This bug drove me crazy. No amount of syncing fixed it. I found that if I modified my module's build.gradle in AndroidStudio (by maybe adding a blank line or a space after a line), and then syncing that file, all is good.

1

Sync didn't help me. Neither helped invalidating cache. I simply removed and cloned again the repository and it worked:

  1. Make sure you have no uncommitted changes
  2. Sync your local repository with remote github
  3. Delete folder with the local repository
  4. Clone the repository from github to local again
  5. Open the cloned repository in the Android Studio
  6. Build and run it again.
1

The project depends on an SDK, and there is none. Go to File -> Project Structure (Edited: I said Settings before) Select Modules, and go to the Dependencies tab Likely you will see No SDK in the Export column. Choose one from the Module SDK dropdown, or create a new one if the list is empty. No SDK should now update to the selected SDK. It should work then... Hopefully. :) Regards

1

For those who are suffering from this problem, I suggest you do a clean install ( delete any existing settings and files of prior installations ). Don't waste time fixing the problem. I am searching for the answer for android studio 3.6.3 with no result.

1

Selecting the Android SDK in Android Studio is a crucial step when developing Android applications. Here are the step-by-step instructions on how to do it:

1.Open Android Studio

2.Just click file and click on project structure

 project structure

3.And then you can click modules and then you can show compile sdk version you can chaing it you can select Compile sdk version

Sdk Version

4.You can also chaing Target sdk version

Target sdk version

5.Sync Project & Rebuild project Again.

0

Source Compatibility should be selected as the minimum Android Version that your app should be compatible with(usually selected as SDK 15), Target Compatibility should be selected as the newest Android Version that your app should be compatible with(SDK 23). Afterwards you want to check your AndroidMenifest and your gradle.build to see if its realy set to the properties selected if not you can just add it manually. and ofcourse you should check the SDK Location is actually pointing to your android studio SDK folder (if you are importing from Eclipse then you should point to your Eclipse SDK folder).

0

Simply:

Build --> Make Project

It's worked for me.

-6

Give SDK path in local.properties file as

sdk.dir=C\:\\Users\\System43\\AppData\\Local\\Android\\sdk

and give latest version in compilesdk in gradle file.

1
  • 3
    Please explain answer properly Commented Mar 20, 2018 at 7:25
1
2

Not the answer you're looking for? Browse other questions tagged or ask your own question.