likequanmintv icon indicating copy to clipboard operation
likequanmintv copied to clipboard

导入项目sync失败

Open Langthron opened this issue 8 years ago • 9 comments

gradle我们是一样的,gradle插件版本也改过了 错误如下: Gradle sync failed: Unable to find method 'com.android.build.gradle.api.BaseVariant.getJavaCompiler()Lorg/gradle/api/Task;'. 请问是要翻墙还是什么问题?最近在研究这个,麻烦有空回一下哈,先谢过。

翻墙重新build吧,或者用手机发射热点build会快点

Langthron avatar Dec 02 '16 01:12 Langthron

我这边导入项目先是包65536错误,然后修复后又报com/google/common/annotations/Beta.class重复,无语了,不知如何处理?

Lsy1992 avatar Dec 02 '16 02:12 Lsy1992

应该不会的, 将annotations包以来去掉试试

chenchengyin avatar Dec 02 '16 02:12 chenchengyin

翻墙重新build吧,或者用手机发射热点build会快点

chenchengyin avatar Dec 02 '16 02:12 chenchengyin

应该是guava和annotations有冲突,但是我并没有找到整个项目中哪里有引用guava...你那边能运行起来?

Lsy1992 avatar Dec 02 '16 02:12 Lsy1992

能啊~

chenchengyin avatar Dec 02 '16 02:12 chenchengyin

:(

Lsy1992 avatar Dec 02 '16 02:12 Lsy1992

@a371166028 翻墙试了还是同样的错误,我公司的网很快的,也没有任何限制,等我有空再捣鼓吧,谢了

Langthron avatar Dec 02 '16 02:12 Langthron

我也跟楼主一样的问题啊.求解决

Aload avatar Dec 02 '16 05:12 Aload

Error:Unable to find method 'com.android.build.gradle.api.BaseVariant.getJavaCompiler()Lorg/gradle/api/Task;'. Possible causes for this unexpected error include:

  • Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)
  • The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart)
  • 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.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

blackmamba123 avatar Dec 02 '16 09:12 blackmamba123