相关疑难解决方法(0)

在Android Studio Arctic Fox Canary 8 中,app 级别的build.gradle 不会生成`allprojects` 部分并在手动添加时导致错误

在 Android Studio Arctic Fox Canary 8 中创建新项目时,这是应用级别的 build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.0.0-alpha08"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.30"

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

task clean(type: Delete) {
    delete rootProject.buildDir
}

Run Code Online (Sandbox Code Playgroud)

在Android Studio 4.1.2中创建相同的新项目时,app级的build.gradle文件是这样的:

// Top-level build file where you can add configuration options common to all sub-projects/modules. …
Run Code Online (Sandbox Code Playgroud)

android gradle android-studio

24
推荐指数
5
解决办法
8106
查看次数

标签 统计

android ×1

android-studio ×1

gradle ×1