Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio Error fail to establish apply plugin com.android.application

Error:(1, 1) A problem occurred evaluating project ':app'.

Failed to apply plugin [id 'com.android.application'] Could not create plugin of type 'AppPlugin'.

Can anyone help me to solve this issue

like image 484
manojprasad Avatar asked Dec 30 '15 22:12

manojprasad


People also ask

How do I find my Gradle version?

In Android Studio, go to File > Project Structure. Then select the "project" tab on the left. Your Gradle version will be displayed here.

What is a Gradle in Android?

Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process, while allowing you to define flexible custom build configurations. Each build configuration can define its own set of code and resources, while reusing the parts common to all versions of your app.


1 Answers

Google releases a new build tool and old makes deprecated I think.

We used: classpath 'com.android.tools.build:gradle:2.0.0-alpha1'

but new version was released and this error occured.

Just replace previous with new version: classpath 'com.android.tools.build:gradle:2.1.0-alpha5'

So check latest build tool from: http://tools.android.com/tech-docs/new-build-system

Stable build tool last version is (I think): classpath 'com.android.tools.build:gradle:1.5.0'

like image 60
mtrakal Avatar answered Oct 21 '22 08:10

mtrakal