[英]android gradle project refresh fail: The device is not ready
Look inside your gradle file for lines something like this (this is mine): 在你的gradle文件中查找类似这样的行(这是我的):
maven {
url "D:/Android/sdk/extras/android/m2repository"
}
I do not have drive D:\\ with Android SDK on my new laptop. 我的新笔记本电脑上没有驱动器D:\\和Android SDK 。 That is why I met the error:
这就是我遇到错误的原因:
Gradle sync failed: The device is not ready
Consult IDE log for more details (Help | Show Log)
In the Android Studio's log I found the line: 在Android Studio的日志中,我发现了以下行:
Caused by: org.gradle.api.UncheckedIOException: Could not normalize path for file 'D:\Android\sdk\extras\android\m2repository'.
Hope this post will help other people to handle this error quickly. 希望这篇文章能帮助其他人快速处理这个错误。
try this algorythm: 试试这个algorythm:
You should connect your android device to computer i think you have driver problem .and you should install your device driver if you use windows bellows link show you how to install driver 您应该将您的Android设备连接到计算机我认为您有驱动程序问题。如果您使用Windows,您应该安装您的设备驱动程序bellows链接显示如何安装驱动程序
Manually installing Android ADB USB Driver 手动安装Android ADB USB驱动程序
If you have implemented product flavors in a project then please check implementation and keystore path. 如果您已在项目中实现了产品风格,请检查实现和密钥库路径。 In my case it was the reason and i have corrected keystore file path in gradle it is working fine now.
在我的情况下,这是原因,我已经更正了gradle中的密钥库文件路径,它现在工作正常。
I had system environment variables GRADLE_HOME and GRADLE_USER_HOME set to non existings directory, which I had to remove to fix a similar issue.我将系统环境变量 GRADLE_HOME 和 GRADLE_USER_HOME 设置为不存在的目录,我必须将其删除以解决类似的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.