Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

android gradle project refresh fail: The device is not ready

When i have move my project to my laptop and import it in file/import project, Android studio alert me

project refresh failed

Error: The device is not ready

error

like image 690
user3249792 Avatar asked Sep 28 '22 17:09

user3249792


1 Answers

Look inside your gradle file for lines something like this (this is mine):

maven {
    url "D:/Android/sdk/extras/android/m2repository"
}

I do not have drive D:\ with Android SDK on my new laptop. 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:

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.

like image 77
user1453201 Avatar answered Oct 03 '22 08:10

user1453201