赞
踩
使用最新版本的 Android Studio Bumblebee 新建 Empty Compose Activity时,编译报错:
使用的版本信息:
报错信息:
Could not initialize class com.android.build.gradle.internal.dsl.decorator.AndroidPluginDslDecoratorKt
build.gradle:
settings.gradle:
build.gradle :
buildscript { ext { compose_version = '1.0.1' } repositories { google() mavenCentral() } dependencies { classpath "com.android.tools.build:gradle:7.0.4" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21" } } task clean(type: Delete) { delete rootProject.buildDir }
settings.gradle:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
maven {
allowInsecureProtocol = true //添加关键字
url "http://nexus.test.com/content/groups/android-common/"
}
}
}
rootProject.name = "ComposeTest"
include ':app'
参考:
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。