Android Studio中无法解析项目的摇篮 [英] Android Studio Can't resolve Gradle project
问题描述
当移动到一个新的电脑我已经失去了一个驱动器,现在使用不同的文件路径,我的编程资产。
When moving to a new computer I have lost a drive and now am using a different file path for my programming assets.
当我开始了我的previous工作项目Android Studio中我遇到有摇篮的问题之一。
When I start up one of my previous working projects in Android Studio I run into an issue with Gradle.
内容如下。
摇篮定时器项目刷新失败:
无法解析摇篮工程。原因:给定的路径(E:\\媒体\\文档\\ Dropbox的\\程序\\的Android \\ AndroidStudioProjects \\定时\\的build.gradle)不指向一个文件
It reads as follows. Gradle 'Timer' project refresh failed: Can't resolve Gradle project. Reason: given path (E:\Media\Documents\Dropbox\Programming\Android\AndroidStudioProjects\Timer\build.gradle) doesn't point to a file
我的新gradle这个路径为C:\\程序\\ gradle这个\\ gradle这个-1.6当我去到摇篮设置在我的项目它说,它检测到这一点,但是打'OK'并保存后/重新加载项目同样的错误仍然存在。
My new gradle path is 'C:\Programs\gradle\gradle-1.6' and when I go to Gradle settings in my project it says that it detects this, however after hitting 'ok' and saving/reloading the project the same error persists.
我GRADLE_HOME的环境变量设置。
这是建立在这个系统工作的其他项目,但是不要给这个以下错误http://services.gradle.org/distributions/gradle-1.6-bin.zip相对使用分布摇篮的 http://services.gradle.org/distributions/gradle-1.6-bin.zip '。
I have GRADLE_HOME set in the environmental variables. Other projects that are built on this system work however do give this following error "Could not execute build using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.6-bin.zip'."
我缺少的配置步骤的地方?
Am I missing a configuration step somewhere?
感谢
推荐答案
感谢您的建议oceansize42,但实际上没有帮助我解决我的问题,因为它发作了我重新启动Android的工作室。
Thanks for your suggestion oceansize42, but actually that didn't help me fix my problem as it reoccurred after I restarted Android Studio.
在一些更多的搜索,我发现了两个文件,引用回到我的老车程。
After some more searching,I found two files with references back to my old drive.
.idea \\ workspace.xml
和
.idea \\ gradle.xml
.idea\workspace.xml and .idea\gradle.xml
workspace.xml包含在有一个老路径的选项KEY_STORE_PATH。
gradle.xml包含我的问题externalProjectPath这是给我的错误。
workspace.xml contained an option "KEY_STORE_PATH" that had an old path. gradle.xml contained my issue "externalProjectPath" that was giving me the error.
更改这两个,然后重新启动完全固定我的问题。
Changing both of these and then restarting fixed my issue completely.
这篇关于Android Studio中无法解析项目的摇篮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!