Android Studio does not allow me to install the Android SDK platform

Everything worked fine until I imported the Esclipse Lollipop examples and the following errors appeared

enter image description here

enter image description here

+6
source share
3 answers

The project that you imported from eclipse probably uses the old version of the android SDK. Check the version of the API in the project. Typically, clicking the "Install missing platforms (s) and synchronization" button works, but it looks like Android Studio cannot connect to the Internet.

There are some security restrictions that Mac OS X places in any application trying to connect to the Internet, especially if you have edited the Info.plist file which is not recommended . Did you get a dialog asking to allow java to create network connections? Did you click "No"?

+2
source

I had the same issue on Mac OS X. Here's how I fixed it.

$cd ~/Library/Android/sdk/tools/ $./android update sdk --no-ui --filter 1 

It will start updating the package in non-gui mode and ask for permission, etc. and finally install correctly.

+7
source

I was in the same mess compiling an AOSP application (like a calculator) on my Android studio. There is a lot of help in this, but the bits are scattered, probably due to different versions for the same problem. Below are my changes if someone finds this useful. I am not saying that this is a 100% solution to this problem, but it gives you a direction in an area of ​​concern. upload the build.grade file to the studio and make the following changes. take a look at my comments on the original modified values. NOTE. You can play with different values ​​according to 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 } 
+3
source

Source: https://habr.com/ru/post/984400/


All Articles