Reputation: 2740
I imported an Android project from Eclipse to Andriod Studio, but when I compile, I get these errors. What do they mean?
Gradle: : org.gradle.api.plugins.PluginInstantiationException: Could not create plugin of type 'AppPlugin'.
Gradle: : java.lang.NoClassDefFoundError: org/gradle/tooling/provider/model/ToolingModelBuilderRegistry
Gradle: : java.lang.ClassNotFoundException: org.gradle.tooling.provider.model.ToolingModelBuilderRegistry
I don't think it has anything to do with my code, since it all worked in Eclipse. On the other hand, I get other projects created in Android Studio to run. Did I do something wrong when exporting or importing the project?
Upvotes: 10
Views: 10141
Reputation: 364
I met same problem while starting using Android Studio, and tried to compile my app in command-line mode. The solution is simple:
set up ANDROID_HOME
in your environment. For me it's like this:
export ANDROID_HOME="/Applications/Android Studio.app/sdk/"
and then, it should build your project successfully by using gradle build
in your project root folder.
Upvotes: 5
Reputation: 345
I was having the same problem. Turned out it was because I had Gradle v1.4 installed. Once I upgraded to v1.6 (download and change path), these problems went away.
Upvotes: 18