置灰:Requires setting the buildFeatures.aidl to true in the build file
解决方法:
build.gradle(app)添加
buildFeatures{aidl true}
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
}
}
————————————————
版权声明:本文为CSDN博主「LINGZ_123」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/GuanZhong12345/article/details/130299670