Carlton Carlton - 4 years ago 242
Android Question

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

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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download