Итак, в моем проекте Gradle продолжает продвигать мою библиотеку компоновки Android (точнее: «androidx.activity:activity-compose») до последней версии 1.8.0-alpha05. Однако для запуска этой версии требуется compileSdk 34, а версия Gradle 8.0.2, похоже, ее не поддерживает.
build.gradle моего приложения:
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id("com.google.dagger.hilt.android")
id("com.google.devtools.ksp")
id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.20'
id 'com.google.gms.google-services'
}
android {
namespace 'com.my_app'
compileSdk 33
defaultConfig {
applicationId "com.my_app"
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug
}
}
applicationVariants.all { variant ->
variant.addJavaSourceFoldersToModel(
new File(buildDir, "generated/ksp/${variant.name}/kotlin")
)
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_18
targetCompatibility JavaVersion.VERSION_18
}
kotlinOptions {
jvmTarget = '18'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion '1.4.6'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
def exoPlayerVersion = "1.0.2"
def room_version = "2.5.1"
def composeBom = platform('androidx.compose:compose-bom:2023.05.01')
implementation composeBom
androidTestImplementation composeBom
implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1'
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.6.1")
implementation 'androidx.activity:activity-compose:1.7.2' // A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> 3 issues were found when checking AAR metadata:
1. Dependency 'androidx.activity:activity-compose:1.8.0-alpha05' requires libraries and applications that
depend on it to compile against version 34 or later of the
Android APIs.
:app is currently compiled against android-33.
Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.0.2 is 33. //
Подробнее здесь: https://stackoverflow.com/questions/765 ... se-project
Gradle продолжает продвигать версию зависимости в моем проекте Android Compose ⇐ Android
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение
-
-
Почему Дженкинс нашел неправильную версию зависимости в моем проекте Maven
Anonymous » » в форуме JAVA - 0 Ответы
- 24 Просмотры
-
Последнее сообщение Anonymous
-