置灰:Requires setting the buildFeatures.aidl to true in the build file
解决方法:
android {
namespace 'com.example.testkotlin'
compileSdk 33
defaultConfig {
applicationId "com.example.testkotlin"
minSdk 24
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 {
compose true
// Disable unused AGP features
buildConfig false
aidl true
renderScript false
resValues false
shaders false
}
}
build.gradle(app)添加
buildFeatures{aidl true}