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.

Share:
24,276

Related videos on Youtube

Zero
Author by

Zero

Just Another Stack Overflow User ;) Zero

Updated on August 13, 2022

Comments

  • Zero
    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'

  • Zero
    Zero over 9 years
    tried 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
    Zero over 9 years
    While tried checking for updates: No repository found at file:/D:/../android-sdk-windows/.
  • Hacker Celluloid
    Hacker Celluloid over 9 years
    This usually occurs for eclipse IDE. Is it eclipse classic or something? You can change eclipse.
  • Zero
    Zero over 9 years
    It's eclipse luna 4.4.1