6

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

enter image description here

enter image description here

AlexMcG
  • 165
  • 1
  • 2
  • 12

3 Answers3

7

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.

Big D
  • 377
  • 4
  • 6
  • Thanks. This is the only answer I found that works. I have a Macbook Pro Retina and an iMac. MPR doesn't have this issue but iMac has. I think it could be related to I have setup React native before and attempts to run Android. – Zorji Mar 11 '16 at 07:36
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
}
mask
  • 6,172
  • 3
  • 24
  • 23
2

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?

Community
  • 1
  • 1
shauvik
  • 3,912
  • 2
  • 23
  • 18
  • I didn't get any java dialog. – AlexMcG Mar 29 '15 at 20:49
  • 1
    Is there anything in this comment that could help? "Ignoring unknown package filter 'android-l'Warning: The package filter removed all packages. There is nothing to install. Please consider trying to update again without a package filter." Could I edit some file and remove the filter? I just don't know what file I am editing – AlexMcG Mar 29 '15 at 20:49
  • Can you paste your manifest xml here? Seems like you might have to replace L with some build number like 21. – shauvik Mar 29 '15 at 20:53
  • I think that's it. L is no longer listed in the package manager. You will need to change L to 21 in your manifest (and/or your build.gradle file). – shauvik Mar 29 '15 at 22:12
  • Fixed everything by changing the gradle dependancy to the latest. – AlexMcG Mar 31 '15 at 01:59
  • 1 = you imported from eclipse is probably "LIE" –  Sep 01 '15 at 21:53