2016-11-30 70 views
2

使用本地gradle發行版:3.2.1 Android studio:最新 我收到此錯誤:插件id爲'com.android.application'找到。 我該如何解決它? 感謝您的幫助和推進Android studio:id爲'com.android.application'的插件未找到

E:\AndroidStudio\jre\bin\java -Dgradle.home=C:\Users\Teodor\Desktop\gradle-3.2.1 -Dtools.jar=E:\AndroidStudio\jre\lib\tools.jar -Didea.launcher.port=7534 -Didea.launcher.bin.path=E:\AndroidStudio\bin -Dfile.encoding=UTF-8 -classpath C:\Users\Teodor\Desktop\gradle-3.2.1\lib\groovy-all-2.4.7.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\ant-1.9.6.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\ant-launcher-1.9.6.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-base-services-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-base-services-groovy-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-cli-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-core-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-docs-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-installation-beacon-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-jvm-services-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-launcher-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-logging-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-messaging-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-model-core-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-model-groovy-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-native-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-open-api-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-process-services-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-resources-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-script-kotlin-0.4.0.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-tooling-api-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-ui-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\gradle-wrapper-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-announce-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-antlr-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-build-comparison-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-build-init-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-code-quality-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-composite-builds-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-dependency-management-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-diagnostics-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-ear-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-ide-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-ide-native-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-ide-play-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-ivy-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-jacoco-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-javascript-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-jetty-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-language-groovy-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-language-java-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-language-jvm-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-language-native-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-language-scala-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-maven-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-osgi-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-platform-base-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-platform-jvm-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-platform-native-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-platform-play-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-plugin-development-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-plugin-use-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-plugins-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-publish-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-reporting-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-resources-http-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-resources-s3-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-resources-sftp-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-scala-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-signing-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-task-cache-http-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-test-kit-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-testing-base-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-testing-jvm-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-testing-native-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\gradle-tooling-api-builders-3.2.1.jar;C:\Users\Teodor\Desktop\gradle-3.2.1\lib\plugins\ivy-2.2.0.jar;E:\AndroidStudio\lib\idea_rt.jar com.intellij.rt.execution.application.AppMain org.gradle.launcher.GradleMain --build-file C:\Users\Teodor\Desktop\kute-master\kute-android-app\app\build.gradle --info 
 
Initialized native services in: C:\Users\Teodor\.gradle\native 
 
Connected to daemon DaemonInfo{pid=12400, address=[26cff26a-bf99-42a6-b321-458633dc2438 port:63045, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1480508568373, context=DefaultDaemonContext[uid=d8845dbc-9033-4bd3-a221-903f5cae28b5,javaHome=E:\AndroidStudio\jre,daemonRegistryDir=C:\Users\Teodor\.gradle\daemon,pid=12400,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]}. Dispatching request Build{id=57715282-f9af-4338-9cb6-212aadad091e.1, currentDir=C:\Users\Teodor\Desktop\kute-master\kute-android-app\app}. 
 
Received result [email protected] from daemon DaemonInfo{pid=12400, address=[26cff26a-bf99-42a6-b321-458633dc2438 port:63045, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1480508568373, context=DefaultDaemonContext[uid=d8845dbc-9033-4bd3-a221-903f5cae28b5,javaHome=E:\AndroidStudio\jre,daemonRegistryDir=C:\Users\Teodor\.gradle\daemon,pid=12400,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be starting). 
 
The client will now receive all logging from the daemon (pid: 12400). The daemon log file: C:\Users\Teodor\.gradle\daemon\3.2.1\daemon-12400.out.log 
 
Starting 37th build in daemon [uptime: 1 hrs 40 mins 31.711 secs, performance: 99%] 
 
Executing build with daemon context: DefaultDaemonContext[uid=d8845dbc-9033-4bd3-a221-903f5cae28b5,javaHome=E:\AndroidStudio\jre,daemonRegistryDir=C:\Users\Teodor\.gradle\daemon,pid=12400,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant] 
 
Starting Build 
 
Settings evaluated using settings file 'C:\Users\Teodor\Desktop\kute-master\kute-android-app\app\settings.gradle'. 
 
Projects loaded. Root project using build file 'C:\Users\Teodor\Desktop\kute-master\kute-android-app\app\build.gradle'. 
 
Included projects: [root project 'app', project ':app'] 
 
Evaluating root project 'app' using build file 'C:\Users\Teodor\Desktop\kute-master\kute-android-app\app\build.gradle'. 
 

 

 
BUILD FAILED 
 
FAILURE: Build failed with an exception. 
 

 

 
Total time: 0.688 secs 
 
* Where: 
 
Build file 'C:\Users\Teodor\Desktop\kute-master\kute-android-app\app\build.gradle' line: 1 
 

 
* What went wrong: 
 
A problem occurred evaluating root project 'app'. 
 
> Plugin with id 'com.android.application' not found. 
 

 
* Try: 
 
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. 
 
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Build file 'C:\Users\Teodor\Desktop\kute-master\kute-android-app\app\build.gradle' line: 1 
 
A problem occurred evaluating root project 'app'.] from daemon DaemonInfo{pid=12400, address=[26cff26a-bf99-42a6-b321-458633dc2438 port:63045, addresses:[/127.0.0.1, /0:0:0:0:0:0:0:1]], state=Idle, lastBusy=1480508568373, context=DefaultDaemonContext[uid=d8845dbc-9033-4bd3-a221-903f5cae28b5,javaHome=E:\AndroidStudio\jre,daemonRegistryDir=C:\Users\Teodor\.gradle\daemon,pid=12400,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done). 
 

 
Process finished with exit code 1

的build.gradle文件:

apply plugin: 'com.android.application' 
 

 
android { 
 
    compileSdkVersion 23 
 
    buildToolsVersion "23.0.3" 
 

 
    defaultConfig { 
 
     applicationId "com.kute.app" 
 
     minSdkVersion 14 
 
     targetSdkVersion 23 
 
     versionCode 1 
 
     versionName "1.0" 
 
    } 
 
    buildTypes { 
 
     release { 
 
      minifyEnabled false 
 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
 
     } 
 
    } 
 
} 
 

 
dependencies { 
 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
 
    testCompile 'junit:junit:4.12' 
 
    compile 'com.android.support:appcompat-v7:23.4.0' 
 
    compile 'com.android.support:design:23.4.0' 
 
    compile 'com.google.android.gms:play-services-maps:9.0.2' 
 
    compile 'com.google.android.gms:play-services-appindexing:9.0.2' 
 
    compile 'com.google.android.gms:play-services-location:9.0.2' 
 
    compile 'com.google.maps.android:android-maps-utils:0.4+' 
 
    compile 'com.mcxiaoke.volley:library-aar:1.0.0' 
 
    compile 'com.firebase:firebase-client-android:2.0.3' 
 
    compile 'com.google.firebase:firebase-database:9.0.0' 
 
    compile 'com.google.firebase:firebase-auth:9.0.0' 
 
} 
 
apply plugin: 'com.google.gms.google-services'

回答

0

確保您的項目水平build.gradle(在這種情況下C:\Users\Teodor\Desktop\kute-master\kute-android-app\build.gradle )有和在buildscript.dependencies塊中使用roid gradle插件。像這樣:

buildscript { 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.2.2' 
    } 
} 
+0

我已經有classpath'com.android.tools.build:gradle:2.1.2' –

0

我有同樣的症狀,但事實證明,原因是不太光彩......我做了CVS合併過程中的錯誤,刪除一些重要的文件。因此我不得不恢復到以前的提交。就我而言,並不遙遠。 希望有一天能幫助別人。

相關問題