android - Android Studio 23.0.0 rc3错误|尝试了所有解决方案不起作用

标签 android android-studio gradle android-gradle-plugin build.gradle

我已经搜索并尝试了所有的stackover流方法,但没有帮助。

我明白了

// 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:1.2.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

当我尝试添加(22 lolipop)&23.0.1时,它显示打开gradle包装器文件应用插件无法正常工作
Error:(19, 0) Gradle DSL method not found: 'android()'
Possible causes:<ul><li>The project 'booook' may be using a version of Gradle that does not contain the method.
<a href="open.wrapper.file">Open Gradle wrapper file</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>
// 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:1.2.3'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
allprojects {
    repositories {
        jcenter()
    }
}

android {
    compileSdkVersion 22
    buildToolsVersion '23.0.1'
}
dependencies {
}

多数民众赞成在我做出更改后最终结果http://s9.postimg.org/fzg0sie8v/image.pnghttp://s30.postimg.org/6eepfqxtd/image.pnghttp://s11.postimg.org/b6l12ec8z/image.pnghttp://s11.postimg.org/b6l12ec8z/image.png

最佳答案

您在顶层构建文件中(文件的第一行)
您应该在子项目中添加此新内容(通常是app / build.gradle)

关于android - Android Studio 23.0.0 rc3错误|尝试了所有解决方案不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32936346/

相关文章:

gradle - Android Studio 无法识别 Espresso 类(class)

java - 是否可以将 android 注释与 android studio 0.4.6 集成?

android - ViewModel类应该包含Android元素吗?

android - 从 Mediastore 获取全屏缩略图 - Android

android - 如何在 android 中为来自 ..Activity.java 的按钮设置背景图像?

android - java.lang.IndexOutOfBoundsException : setSpan (4 . .. 18) 结束超过长度 6

android - 如何在 Android Studio 中清除最近的项目列表?

android - 如何获取 Appium Android 驱动程序?

android - 如何在 Gradle Kotlin DSL 中配置 Firebase 性能监控插件扩展

android - Gradle 错误 - 在 APK AndroidManifest.xml 中复制了重复文件