Failed to find target with hash string 'android-24'

37,682

Solution 1

There is no targetSdkVersion of 24, nor is there compileSdkVersion of 24, at this time. Those will be valid values (presumably) when the next version of Android ships.

For the N Developer Preview, based on my work over here, use:

  • compileSdkVersion 'android-N'
  • buildToolsVersion '24.0.0 rc1'
  • targetSdkVersion 'N'

You also need Gradle 2.10 or higher (see your gradle/wrapper/gradle-wrapper.properties file or your standalone Gradle installation) and 'com.android.tools.build:gradle:2.1.0-alpha1' (see the top-level build.gradle file).

Solution 2

Worked for me: 1. Manual install missing platforms in SDK Manager 2. RESTART Android Studio

Solution 3

Following worked for me:

  • Updated Android Studio to the latest
  • Restart Android Studio
  • AS provides options to install missing platform plugins
  • Click and update.
Share:
37,682
DropArt
Author by

DropArt

Updated on February 19, 2020

Comments

  • DropArt
    DropArt over 4 years

    enter image description here

    I am getting this error after changing all the Google libraries to 24.0.0 and changing the compileSdkVersion and targetSdkVersion to 24. As you can see in the attached images I installed all Android N packages, but there only stands: "Partially installed". How can I fix this?

    enter image description here

    enter image description here

  • DropArt
    DropArt over 8 years
    Thanks for the quick answer. Could you please also add the link to the blog entry or where this information is provided?
  • CommonsWare
    CommonsWare over 8 years
    @DropArt: I do not know what "blog entry" you are referring to. If you are referring to official Android documentation, I am not a Google engineer and cannot modify the documentation. I have tried for years to get them to fix documentation bugs with limited success.
  • DropArt
    DropArt over 8 years
    @CommonsWare You misunderstood me. I meant from where you have this information?
  • CommonsWare
    CommonsWare over 8 years
    @DropArt: A combination of this bit of documentation, this sample app, and my own experimentation.