Gradle同步失败:com.android.builder.model.AndroidProject.getProjectType()I [英] Gradle sync failed: com.android.builder.model.AndroidProject.getProjectType()I

查看:968
本文介绍了Gradle同步失败:com.android.builder.model.AndroidProject.getProjectType()I的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  Gradle同步失败:java.lang.NoSuchMethodError: com.android.builder.model.AndroidProject.getProjectType()I 

或者有时我会得到这个错误:

  Gradle同步失败:com.android.builder.model.AndroidProject.getProjectType()I 

这个错误会弹出(在android studio的gradle文件的顶部弹出的黄色框):

  Gradle项目同步失败。基本功能(例如编辑,调试)将无法正常工作。 

几天前我遇到了同样的问题,但我只是单击了文件/ Invalid Caches /重启和Gradle同步成功。但是,gradle失败今天又回来了。

stackoverflow.com/questions/21066598/android-studio-0-4-2-gradle-project-sync-failed-error\">建议在这里这篇文章和其他SO帖子,但似乎没有工作,错误仍然在那里。



是否有任何其他建议可以尝试解决此错误?

解决方案我现在已经设法摆脱了这个问题。看起来它与最新的Android Studio有关。



我从下载了 2.3 Beta 1 >金丝雀频道,这就是问题所在。



我从 Canary Channe l返回使用 2.3 Canary 3 ,现在它工作正常。


My Gradle sync fails with the following error message in the log:

Gradle sync failed: java.lang.NoSuchMethodError: com.android.builder.model.AndroidProject.getProjectType()I

or sometimes I get this error instead:

Gradle sync failed: com.android.builder.model.AndroidProject.getProjectType()I

And this error pop up (The yellowish box that pops up at top of the gradle file in android studio):

Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly.

I had the same issue a few days earlier, but I just clicked file/Invalid Caches/restart and the Gradle sync succeded.However, the gradle fail has returned again today.

I have tried everything suggested here in this post and other SO posts but nothing seem to work, the error is still there.

Is there any suggestions on other things I can try to fix this error?

解决方案

I have managed to get rid of this problem now. It seems it had something to do with the latest Android Studio.

I downloaded 2.3 Beta 1 from the Canary Channel, and that's where the problem was.

I went back to using 2.3 Canary 3 from the Canary Channel, and now it works fine.

这篇关于Gradle同步失败:com.android.builder.model.AndroidProject.getProjectType()I的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆