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

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

这是我第一次尝试 Android Studio.我安装了 0.8.0 并更新到 0.8.2.一旦创建了项目,我就会收到错误消息:

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:

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

Error:(1, 0) Plugin with id 'com.android.application' not found

C:UsersBobAndroidStudioProjectsHelloAgain6appuild.gradle

C:UsersBobAndroidStudioProjectsHelloAgain6appuild.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']) }

和 C:UsersBobAndroidStudioProjectsHelloAgain6uild.gradle

and C:UsersBobAndroidStudioProjectsHelloAgain6uild.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() } }

推荐答案

更新答案(2020 年 12 月 2 日)

最新 Gradle: 6.5

版本检查:

  • ./gradlew -v

如何更新:

  • 设置网址:./gradlew wrapper --gradle-version=6.5 --distribution-type=all
  • 更新:./gradlew 包装器

最新的 Android Gradle 插件: 4.1.0

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

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

buildscript { repositories { google() // For Gradle 4.0+ maven { url 'maven.google' } // For Gradle < 4.0 } dependencies { classpath 'com.android.tools.build:gradle:4.1.0' } }

在此处阅读更多信息:developer.android/studio/build/index.html 以及这里的版本兼容性:developer.android/studio/releases/gradle-plugin.html#updating-gradle 和 dl.google/dl/android/maven2/index.html.

Read more here: developer.android/studio/build/index.html and about version compatibility here: developer.android/studio/releases/gradle-plugin.html#updating-gradle and dl.google/dl/android/maven2/index.html.

我遇到了同样的错误,您需要确保您的 Gradle 版本与您的 Android Gradle 插件兼容.

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

最新版本的 Gradle 是 2.0,但您需要使用 1.12 才能使用 Android Gradle 插件.

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:54:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1551296.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:未找到   插件   错误   quot   android

发布评论

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

>www.elefans.com

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