Android SDK error: unable to resolve target ‘android-x’

I came across a few variants of this error message as I was trying to install the Android SDK plugin for Eclipse on openSUSE today:

Unable to resolve target 'android-1'
Unable to resolve target 'android-2'
Unable to resolve target 'android-3'
Unable to resolve target 'android-4'
Unable to resolve target 'android-5'
Unable to resolve target 'android-6'
Unable to resolve target 'android-7'
Unable to resolve target 'android-8'
Unable to resolve target 'android-9'
Unable to resolve target 'android-10'
Unable to resolve target 'android-11'
Unable to resolve target 'android-12'

The cause turned out to be that it not find the corresponding Android SDK version. If the android SDK is installed correctly, then the problem is that the platform SDK requested by the “AndroidManifest.xml” android:minSdkVersion is not installed.

Here’s the solution mapping:

Unable to resolve target 'android-1' ==> (Android 1.0) change the "AndroidManifest.xml"
Unable to resolve target 'android-2' ==> (Android 1.1) change the "AndroidManifest.xml"
Unable to resolve target 'android-3' ==> install SDK Platform Android 1.5
Unable to resolve target 'android-4' ==> install SDK Platform Android 1.6
Unable to resolve target 'android-5' ==> install SDK Platform Android 2.0
Unable to resolve target 'android-6' ==> install SDK Platform Android 2.0.1
Unable to resolve target 'android-7' ==> install SDK Platform Android 2.1
Unable to resolve target 'android-8' ==> install SDK Platform Android 2.2
Unable to resolve target 'android-9' ==> install SDK Platform Android 2.3
Unable to resolve target 'android-10' ==> install SDK Platform Android 2.3.3
Unable to resolve target 'android-11' ==> install SDK Platform Android 3.0
Unable to resolve target 'android-12' ==> install SDK Platform Android 3.1

The error can be solved by using the Android SDK Setup utility:

Eclipse -> ”Windows” -> “Android SDK and AVD Manager” -> “Available packages” -> select and install the requested SDK Platform.

 

Advertisement