繁体   English   中英

在Android Studio中导入Gradle Android项目时出错

[英]Error importing a Gradle Android project in Android Studio

这是一个后续问题在这里 我最初只是尝试安装Android项目提供的.apk可执行文件,但现在我正在尝试自己构建项目,该项目位于: https//github.com/garlicPasta/dotViewer

它本质上应该从服务器接收3D图形文件( .ply格式)并将其可视化。

该项目正在使用Gradle,但是当我尝试在Android Studio中导入它时,我看到以下消息:

Error:Unable to find method 'com.android.build.gradle.tasks.factory.AndroidJavaCompile.setDependencyCacheDir(Ljava/io/File;)V'.
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
<a href="syncProject">Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
<a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li><li>Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.</li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

我尝试用gradle手动编译它(安装了gradle 2.10以与项目兼容)。 有经验的人可以帮我导入和运行项目并找出编译时缺少的内容吗?

BTW,有两个失踪。 java可编译后生成的文件.proto文件。

从Github导入Android-Project后,我遇到了同样的错误。

我可以通过从现有项目复制文件PROJ_DIR/.idea/gradle.xml来修复它。

我想这是一个问题gradle-2.14.1-all,当我将Gradle版本更改为3.3,然后同步项目。这个问题消失了。你可以尝试一下。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM