错误:(1,0)未找到插件ID为'com.android.application“

编程入门 行业动态 更新时间:2024-10-14 06:24:34
本文介绍了错误:(1,0)未找到插件ID为'com.android.application“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

这是我的机器人工作室的第一次尝试。我安装了0.8.0和更新,以0.8.2。一旦项目被创建我得到的错误信息:

  

错误:(1,0)未找到插件ID为'com.android.application

C:\用户\鲍勃\ AndroidStudioProjects \ HelloAgain6 \程序\ build.gradle

应用插件:com.android.application 安卓{     compileSdkVersion 20     buildToolsVersion20.0.0     defaultConfig {         的applicationIDcom.example.bob.helloagain6         的minSdkVersion 15         targetSdkVersion 20         版本code 1         VERSIONNAME1.0     }     buildTypes {         推出 {             runProguard假             proguardFiles getDefaultProguardFile('ProGuard的-android.txt'),'proguard-rules.pro         }     } } 依赖{     编译文件树(导演:库,包括:['的* .jar']) }

和C:\用户\鲍勃\ AndroidStudioProjects \ HelloAgain6 \ build.gradle

//顶级构建文件,你可以到各子项目/模块添加常用的配置选项。 buildscript {     库{         jcenter()     }     依赖{         类路径com.android.tools.build:gradle:0.12.+         //注意:不要在这里放置应用程序依赖;他们属于         //在单个模块build.gradle文件     } } allprojects {     库{         jcenter()     } }

解决方案 更新答案(15年11月2日)

最新摇篮: 2.8

请与:摇篮-v

这里下载: services.gradle/distributions/gradle-2.8-bin.zip

最新的Andr​​oid构建工具: 1.5.0

如果您以下code代码片段添加到您的build.gradle文件的顶部,摇篮将更新构建工具。

buildscript {     库{         jcenter()//或mavenCentral()     }     依赖{         类路径com.android.tools.build:gradle:1.5.0     } }

在这里阅读更多:tools.android/tech-docs/new-build-system

原来的答案

我有同样的错误,你需要确保您的摇篮版本是否与你的Andr​​oid摇篮插件兼容。

摇篮的最新版本是 2.0 ,但你需要使用 1.12 为了使用Android摇篮插件。

This is my first attempt at Android Studio. I installed 0.8.0 and updated to 0.8.2. As soon as a project is created I get the error message:

Error:(1, 0) Plugin with 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 where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:0.12.+' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } }

解决方案

Updated Answer (11/2/15)

Latest Gradle: 2.8

Check with: gradle -v

Download here: services.gradle/distributions/gradle-2.8-bin.zip

Latest Android Build Tools: 1.5.0

If you add the following code snippet to the top of your build.gradle file, gradle will update the build tools.

buildscript { repositories { jcenter() // or mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' } }

Read more here: tools.android/tech-docs/new-build-system

Original Answer

I had this same error, you need to make sure your Gradle version is compatible with your Android Gradle Plugin.

The latest version of Gradle is 2.0 but you need to use 1.12 in order to use the Android Gradle Plugin.

更多推荐

错误:(1,0)未找到插件ID为'com.android.application“

本文发布于:2023-11-02 03:55:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1551299.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:未找到   插件   错误   ID   android

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!