猿问

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

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

这是我在Android Studio上的第一次尝试。我安装了0.8.0并更新到0.8.2。创建项目后,我收到错误消息:

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

C:\用户\鲍勃\ AndroidStudioProjects \ HelloAgain6 \程序\的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'])}

和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()
    }}


12345678_0001
浏览 1365回答 3
3回答

不负相思意

供将来参考:对我来说,这个问题完全是因为我没有以管理员身份运行Android Studio。我将Windows上的快捷方式配置为始终以管理员身份运行,但重新安装Android Studio后,快捷方式已被替换,因此无需管理员权限即可运行。这导致了很多不透明的错误,包括这个问题中的错误。

慕桂英546537

如果项目根目录中存在settings.gradle和settings.gradle.kts文件都存在(可能包含相同的模块),也可能发生这种情况。您应该只有这些文件之一。
随时随地看视频慕课网APP

相关分类

Android
我要回答