android - Android Studio中的Gradle错误

标签 android gradle android-studio

我该怎么做才能解决此问题:

org.gradle.tooling.GradleConnectionException: 

无法使用Gradle安装执行构建
C:\Users\avand\.gradle\wrapper\dists\gradle-1.8-bin\vruqmccc8532n7gr46qavsii8\gradle-1.8

无法使用Gradle安装执行构建
C:\Users\avand\.gradle\wrapper\dists\gradle-1.8-bin\vruqmccc8532n7gr46qavsii8\gradle-1.8

谢谢。

最佳答案

我的解决方案=低于建议的解决方案列表

我最近一个小时来一直在处理这个问题,并且“认为”到目前为止,我已经解决了我的问题/问题...

因此将在这里发布,并且由于其他人正在搜索此内容。

上面的错误与我得到的错误相同

经过一番搜索,我遇到了各种各样的建议,但是这个问题似乎也因其他人的解决方案而异。

我什么时候遇到这个问题的???

有时,在编译/构建项目时会出现此错误,但是当我尝试直接将项目“运行”到物理测试设备时,它总是会出现。调试和发布版本也可以正常工作。

系统重新启动和IDE重新启动确实工作了一段时间,但是过了一会儿又不得不重新启动系统...我讨厌这样做,我最多每天最多要重新启动一次。下面列出的其他解决方案对我来说不起作用。 ..

如果我为Nexus 7安装另一个USB驱动程序并使用该设备进行测试,该问题本身似乎也会出现。

Suggested solutions from Google (from my bad short term memory)

  1. Restart the Android Studio IDE / Application - rarely worked
  2. Restart the computer itself - worked most times for a limited time
  3. Perform a project rebuild - error would some times occur during this
  4. Perform a ./gradlew clean - error would some times occur during this
  5. Create a new basic / blank project - same result most times
  6. Different Android Device - table and phone did the same results
  7. Restart ADB service - did not work for me
  8. Another Dev Computer - was to lazy to test this.. to much effort install A-S
  9. Delete the projects gradle folder - this messed mine up / lucky for backups ;)
  10. Change the gradle dependency version - "com.android.tools.build:gradle"- did not work
  11. Re-install gradle inside User folder - "shown in error" - same result
  12. Re-install Android Studio - did not attempt this (yet)
  13. Different version of Android Studio - did not attempt this (yet)
  14. And what ever else i tested quickly


发布以上内容只是为了给人们一个快速列表,以使他们免于谷歌关键词的提炼

AND what ended up working for me so far

Restarting the PC worked and after a little time the problem comes back, so decided to open my task manager and have a look at what was taking SYSTEM MEMORY and noticed Google Chrome was using a fair bit (as it does, but i love it)..So i shut it down along with (a hd movie, email clients and all the other usual stuff i have running) and hit the "Run" button... It worked.... Restored various backups with nothing else running.. It worked...



对我来说,这是系统资源! 我还可以通过加载内存中有很多应用程序的系统来重现该问题。

编辑-早晨

今天早上,当我检查项目时,它将“运行”正常,没有问题,“使项目”确实产生了错误,然后执行一个简单的“重建项目”再次解决了此问题。可能遗留了缓存或其他内容吗?

STILL始终与系统内存有关

即使现在我仍然遇到这个错误,大多数时候关闭Google chrome都会这样做,而且浏览器中加载的页面也没有运行任何Java,因此我也不认为这是一个冲突。

硬盘/写入和读取速度

我认为这根本不适用,但是只是将其添加为考虑因素...如果其他所有方法仍然失败,请尝试将您的项目重新定位到另一个物理硬盘上?没有另一个分区。

关于android - Android Studio中的Gradle错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20783238/

相关文章:

android - 为什么使用隐式 Intent 启动服务不安全?

android - 如何在Gradle中调试 “Failed to open zip file”?

java - 使用 gradle 构建项目时图像产品空指针 - Java

android - build.gradle 和项目库

android - 黑色启动器图标 Android

Android Studio 我不断收到 Gradle 错误 "The process cannot access the file because it is being used by another process"

Android Facebook sdk 无法正确处理设备旋转?

java - 安卓NDK : Application targets deprecated ABI(s): armeabi error after update NDK

android - Build.Gradle 中的库版本错误

java - Android 将 Arraylist 数据设置为自定义适配器