-1

I am trying to import a project in Android Studio that was initially meant to be compiled with Android-19 API. However now I need to make it work on a device with Android 4.0.3 (so I want to compile with android-15). Yet, Android Studio keeps telling me this, no matter what I do:

Error:failed to find target android-19 : C:\Users\BurrafatoMa\AppData\Local\Android\Sdk
<a href="install.android.platform">Install missing platform(s) and sync project</a>

(Lucky me that I did not have android-19 installed, otherwise I would have never noticed, right?)

AndroidManifest.xml:

<uses-sdk
    android:minSdkVersion="10"
    android:targetSdkVersion="15" />

build.gradle:

android {
    compileSdkVersion 15
    buildToolsVersion '17.0.0'

    defaultConfig {
        minSdkVersion 10
        targetSdkVersion 15
        versionCode 1
        versionName "1.0"
    }
...

project.properties:

target=android-15

I tried the solutions proposed in stackoverflow and on other sites, with no success. What am I missing?

Community
  • 1
  • 1
ocramot
  • 1,361
  • 28
  • 55

1 Answers1

0

Maybe the project contains some module or library that needs android-19 to compile, I think

tinyao
  • 98
  • 1
  • 5
  • Seems correct! That is what I was just investigating in the meantime. In fact I found a referenced library that needs 19; yet after I changed it to require 15, it keeps giving me the same error (in the library). Looking for some other hidden dependences... – ocramot Mar 09 '15 at 12:33
  • I just forgot do update this almost-year-old question of mine. Yes, the library was referencing another library and it needed android-19. Quite annoying that I needed to go hunting around for the hidden dependency, though. – ocramot Jan 21 '16 at 09:17