解决androidstudio2022.2.1新建不了aidl文件
·
置灰: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}更多推荐

所有评论(0)