intelliJ IDEA 13 error: please select Android SDK

2019-01-21 10:10发布

I have installed Android SDK 22.3 and JDK 1.7 update 21 on Win7 x64. Now I created an empty android application project using intelliJ 13.0.1 (also use Emulator as target device) and tried to build the project, but encountered the 'Error: Please select Android SDK'.

So I choose Emulator as the Target Device, but I could not select my AVD, as there is a Error: Cannot find any configured Android SDK.

In the Project Structure, it clearly shows 'Android 4.4.2 platform' as Project SDK. So I am totally confused, don't know how to resolve the issue.

ps. I was upgrading intelliJ 12.1.2 to intelliJ 13.0.1, and all the settings were automatically inherited from 12.1.2 when launching 13.0.1, but it seems not all the settings were exactly copied over to 13.0.1, which is unexpected.

cheers

18条回答
你好瞎i
2楼-- · 2019-01-21 10:36

I had same problem once. every things seems right. I restart, delete and invalidate cache of Android studio, rebuild, clean and nothings changed. It is finally solved by click on Sync Project with Gradle Files button in android studio 3.0

Sync Project with Gradle Files button

查看更多
太酷不给撩
3楼-- · 2019-01-21 10:36

I had a similar problem. I had to add the same android sdk that i used before again and it worked.

查看更多
放我归山
4楼-- · 2019-01-21 10:40

in android 3.1.1 we cant find sync project in tools so C:\Users\AndroidStudioProjects\projectname\.idea\libraries remove the files from libraries and sync again

查看更多
Viruses.
5楼-- · 2019-01-21 10:40

I faced the problem in IntelliJ Idea 14 actually. My project was working fine on Android Studio. I decided to continue development on IntelliJ idea. After import of project, I wasn't successful to RUN it and I got similar error message in Edit Configuration box. Based on What @Ali said, I deleted all my SDKs and reinstalled them again but didn't work.

I opened "Project Structure">"Platform Settings">SDKs. I found "Build target" of "Android API 21 Platform" is not set. By set it to one of my latest SDK the problem fixed and I could run project without problem.

查看更多
\"骚年 ilove
6楼-- · 2019-01-21 10:41

If you can't compile a proyect and you have this message:

enter image description here

Go to File -> Project Structure, then go to Modules section and select your module app and then select a Compile Sdk Version and a Build Tools Version after that click in OK.

enter image description here

Wait until gradle synchronize and ready!

查看更多
beautiful°
7楼-- · 2019-01-21 10:41

Check next lines in you app build.gradle file.

android {
    compileSdkVersion 25       <--- Set exist in local machine sdk version.
    buildToolsVersion '25.0.3' <--- Set exist build tools version.
}
查看更多
登录 后发表回答