gradle - Error:(1, 0) Plugin with id 'com.android.application' not found -
this first attempt @ android studio. installed 0.8.0 , updated 0.8.2. project created error message:
error:(1, 0) plugin id 'com.android.application' not found
c:\users\bob\androidstudioprojects\helloagain6\app\build.gradle
apply plugin: 'com.android.application' android { compilesdkversion 20 buildtoolsversion "20.0.0" defaultconfig { applicationid "com.example.bob.helloagain6" minsdkversion 15 targetsdkversion 20 versioncode 1 versionname "1.0" } buildtypes { release { runproguard false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) }
and c:\users\bob\androidstudioprojects\helloagain6\build.gradle
// top-level build file can add configuration options common sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:0.12.+' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } }
updated answer (8/7/17)
latest gradle: 4.1
version check:
./gradlew -v
how update:
- set url:
./gradlew wrapper --gradle-distribution-url https\://services.gradle.org/distributions/gradle-4.1-all.zip
- update:
./gradlew wrapper
latest android gradle plugin: 2.3.3
if add following code snippet top of build.gradle file, gradle update build tools.
buildscript { repositories { jcenter() } dependencies { classpath "com.android.tools.build:gradle:2.3.3" } }
read more here: http://tools.android.com/tech-docs/new-build-system , version compatibility here: http://tools.android.com/tech-docs/new-build-system/version-compatibility.
original answer
i had same error, need make sure gradle version compatible android gradle plugin.
the latest version of gradle 2.0 need use 1.12 in order use android gradle plugin.
Comments
Post a Comment