2017-06-29 116 views
0

這是後續問題here。我最初嘗試只安裝在Android項目給出的.apk可執行文件,但現在我想建立的項目我自己,這是位於:https://github.com/garlicPasta/dotViewer在Android Studio中導入Gradle Android項目時出錯

它基本上應該接收3D圖形文件(.ply格式)從服務器並可視化它。

該項目採用搖籃,但是當我試圖將其導入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是兼容與該項目)。有更多經驗的人可以幫助我導入和運行項目並找出編譯時缺少的內容嗎?

順便說一句,有兩個失蹤。 java文件可以在編譯.proto文件後生成。

回答

3

從Github導入Android-Project後,我有同樣的錯誤。

我可以通過從現有項目複製文件PROJ_DIR/.idea/gradle.xml來修復它。      

0

我想這是一個問題gradle-2.14.1-all,當我將Gradle版本更改爲3.3,然後同步項目。此問題消失。您可以嘗試它。

相關問題