android - 未能找到哈希字符串为 'android-24' 的目标

标签 android android-gradle-plugin android-sdk-manager android-7.0-nougat

enter image description here

将所有 Google 库更改为 24.0.0 并将 compileSdkVersiontargetSdkVersion 更改为 24 后出现此错误。 正如您在附加图片中看到的那样,我安装了所有 Android N 软件包,但只显示:“部分安装”。 我该如何解决这个问题?

enter image description here

enter image description here

最佳答案

此时没有24的targetSdkVersion,也没有24的compileSdkVersion。下一个版本的 Android 发布时,这些值(大概)将是有效的。

对于 N 开发者预览版,基于 my work over here ,使用:

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

您还需要 Gradle 2.10 或更高版本(请参阅您的 gradle/wrapper/gradle-wrapper.properties 文件或您的独立 Gradle 安装)和 'com.android.tools.build:gradle :2.1.0-alpha1'(参见顶级 build.gradle 文件)。

关于android - 未能找到哈希字符串为 'android-24' 的目标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35941757/

相关文章:

android - 如何在gradle中并行生成productFlavors

android - flutter doctor --android-licenses 不起作用

android - 使用 javafx 和 apache POI 的项目在 dex 期间出错

android - 如何在 PreferenceFragment 中加载首选项默认值?

Android Quickblox 公共(public)聊天对话框占用者 ID null

Android Firebase NoClassDefFoundError : com. google.firebase.FirebaseOptions 更新到新的 firebase 后

android - 以安全的方式从相机捕获全分辨率图像(如果可能,不存储到磁盘)

java - 检索项目 : No resource found that matches the given name android 的父级时出错

java - 如何解决问题 "Failed to install the following Android SDK packages as some licences have not been accepted."?

android - 没有与请求的版本匹配的 NDK 版本