Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 292
DropArt Avatar asked Mar 11 '16 13:03

DropArt


1 Answers

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).

like image 178
CommonsWare Avatar answered Oct 04 '22 11:10

CommonsWare