Unable to resolve target 'android-21'
24,276
Solution 1
Right Click on Project -> Properties -> android
-> choose your target api level you have,
Then press Apply and Ok
And clean the project once and rebuild it.
Solution 2
Go to Windows -> Android SDK Manager
Install the Android API Level you want, in this case 21.
Once you've finished installing, go to Window -> Preference -> Android
. You should get a list of available targets. Click Apply then Ok.
Now right click your project, go to properties. Click Android. Choose your desired target.
Related videos on Youtube
Comments
-
Zero over 1 year
I have the latest ADT plugin for eclipse: ADT-23.0.4.
Eclipse Version: Luna Service Release 1 (4.4.1).Still I am getting this error while importing a project:
Unable to resolve target 'android-21'
-
Jim In Texas over 9 years
-
-
Zero over 9 yearstried it.....got these errors: "The connection to adb is down, and a severe error has occured." "You must restart adb and Eclipse." and "Please ensure that adb is correctly located at D:\..\adb.exe"
-
Zero over 9 yearsWhile tried checking for updates: No repository found at file:/D:/../android-sdk-windows/.
-
Hacker Celluloid over 9 yearsThis usually occurs for eclipse IDE. Is it eclipse classic or something? You can change eclipse.
-
Zero over 9 yearsIt's eclipse luna 4.4.1