更新androidx.appcompat库后:appcompat:1. 5. 1到版本1. 6. 0 android studio给了我这个错误消息:error message
我已经将compileSdk和versionSdk从版本32更新到版本33。在此之后,元素的大多数属性不再显示在Design模式中。
attributes before|attributes after
构建.gradle(应用程序):
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.google.gms.google-services'
}
android {
compileSdk 33
defaultConfig {
applicationId "com.gramzin.kilo"
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding = true
}
}
dependencies {
implementation platform('com.google.firebase:firebase-bom:31.2.0')
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.firebase:firebase-database-ktx:20.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'androidx.activity:activity-ktx:1.5.1'
}
我尝试将gradle版本更改为7.4.2,将android gradle插件版本更改为7.2.2,但没有任何帮助。
1条答案
按热度按时间mitkmikd1#
我更新了android studio和gradle到最新版本,一切正常