当前位置:Gxl网 > APP开发 > intelliJ IDEA 13 error: please select Android SDK

intelliJ IDEA 13 error: please select Android SDK

时间:2021-07-01 10:21:17 帮助过:2人阅读

I encountered this error after installing Intellij IDEA Ultimate 14.1 and opening an existing Android project I had created using Android Studio. It turns out I just had to add the Android SDK to my list of SDKs and fix the project/module SDK settings. This is how I did it:

Go to File -> Project Structure. Click on the Project tab under Project Settings. Under Project SDK click on New -> Android SDK.

技术分享

Now select the existing directory for your Android SDK. In my case it was in this folder:

C:\Users\<windows username>\AppData\Local\Android\android-sdk

Click Ok. A menu pops up asking you to set the Java SDK + Build target. You can either change these or leave it as its defaults and hit Ok. You should now see "Android API XX Platform" in the Project SDK dropdown. Click apply on the bottom. Then go to the Modules tab under Project Settings and click on the folders in the modules listing.

技术分享

For each folder go to the dependencies tab and change the Module SDK to the new Android SDK and click apply. Then click Ok to close the Project Structure dialog.

After doing the above, my project was fixed.