找不到带有哈希字符串"android-P"的目标安装缺少的平台并同步项目 [英] Failed to find target with hash string 'android-P' Install missing platform(s) and sync project

查看:62
本文介绍了找不到带有哈希字符串"android-P"的目标安装缺少的平台并同步项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

遵循此Android教程 https://codelabs.developers. google.com/codelabs/mdc-101-java/#1 我正在尝试在android studio 3.2金丝雀版本中设置android-p.

Following this android tutorial https://codelabs.developers.google.com/codelabs/mdc-101-java/#1 I'm trying to setup android-p in android studio 3.2 canary version.

我已从github下载以下项目以测试材料设计 https://github.com/material-components/material-components-android-codelabs ,但是在gradle构建运行时出现错误(无法找到带有哈希字符串'android-P'的目标,请安装缺少的平台并进行同步项目)

I have downloaded the following project from github to test material design https://github.com/material-components/material-components-android-codelabs but I get an error when gradle build runs (Failed to find target with hash string 'android-P' Install missing platform(s) and sync project)

当我在sdk管理器中查看时,我看到已安装Android P,但gradle无法识别它.

When I look in the sdk manager I see Android P is installed but gradle is not recognizing it.

有什么主意吗?谢谢

推荐答案

这不是您所使用的目标平台的问题,该问题很可能与Google Maven存储库中有关Google工件的当前情况有关,例如您可以在 此处 看到.

It's not a problem of the target platform that you are using, the problem is most probably related to the current situation about Google artifacts from the Google Maven repository, as you can see here.

长话短说,Google存储库包含某些工件的不正确校验和. JFrog Bintray停止将文件从Google存储库中移出,并考虑到它们正在镜像Google的存储库,一切都搞砸了.

Long story short, Google repository contained incorrect checksums for certain artifacts. JFrog Bintray stopped bringing files over from Google repository, and having in consideration they were mirroring Google's repositories, it all messed up.

目前最简单的解决方案是切换存储库站点的顺序,因此如果您有: jcenter() google() 只需通过以下方式进行更改: google() jcenter()

The easiest solution for now is just switching the order of the repositories sites, so if you have: jcenter() google() just change it by: google() jcenter()

如果您想进一步了解JFrog Bintray为何镜像那些Google存储库,请不要问,因为有人知道,哈!

If you want to know more about why JFrog Bintray is mirroring those Google repos, don't ask, because anyone knows, ha!

结果:由于此问题,数十万个存储库已损坏/损坏.

Result: Hundreds of thousands of repositories corrupted/broken due to this problem.

关于它有一些棘手的话题,您可以在其中> 此处 > 此处

There's been some ragging threads about it, you can check some of them here, here or here

祝你好运!

这篇关于找不到带有哈希字符串"android-P"的目标安装缺少的平台并同步项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆