Android studio not letting me install the Android SDK platform

送分小仙女□ 提交于 2019-12-07 03:40:13

问题


Everything was working fine until I imported Esclipse Lollipop examples and the following errors showed up


回答1:


The project you imported from eclipse is probably using an older version of the android SDK. Check the API version in the project. Typically, clicking the "Install missing platform(s) and sync project" works but seems like Android Studio isn't able to connect to the internet.

There are some security restrictions that Mac OS X places on any application trying to connect to the internet, especially when you've edited the Info.plist file, which is not recommended. Did you get a dialog asking your to allow java to make network connections? Perhaps you clicked No?




回答2:


I had the exact same problem on Mac OS X. Here is how I fixed it.

$cd ~/Library/Android/sdk/tools/

$./android update sdk --no-ui --filter 1

It will start the update of package in non-gui mode and ask for permission etc. and finally install well.




回答3:


I was in the same mess while compiling AOSP app (e.g. Calculator) on my Android studio There is lot of help on this, but bit scattered probably because of different versions for same issue. Below is my changes if some one find it useful. I do not claim its a 100% solution for this issue but gives you an direction to the area of concern. load your build.grade file into studio and do following modifications. take a look at my comments against the original changed values. NOTE: You can play with different values based on your requirements.

compileSdkVersion 21   // Remove the "Android-L"
buildToolsVersion "20.0.0"  //Replace "20"

defaultConfig {
        applicationId "com.google.android.apps.calculator"
// Add following two line based on your sdks support by default studio takes API level 1
       minSdkVersion 21
       targetSdkVersion 22
    }

dependencies {
    compile files("arity-2.1.2.jar")
    compile "com.android.support:support-v4:22.2.0"  // Add 22.2.0
}


来源:https://stackoverflow.com/questions/29334086/android-studio-not-letting-me-install-the-android-sdk-platform

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!