I am getting this error while trying to build the APK file of the project.
这是我的Gradle文件
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
compileSdkVersion 34
defaultConfig {
applicationId ""
minSdkVersion 21
targetSdkVersion 34
versionCode 1
versionName "1.0.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.google.android.material:material:1.11.0'
//okhttp logging interceptor
implementation 'com.squareup.okhttp3:logging-interceptor:4.12.0'
//Retrofit Library
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'io.github.shashank02051997:FancyToast:2.0.2'
//External Libraries-------------------
implementation 'io.realm:android-adapters:1.4.0'
implementation 'com.github.ceryle:RadioRealButton:v1.3'
implementation 'com.yarolegovich:lovely-dialog:1.1.1'
implementation 'de.hdodenhof:circleimageview:3.1.0'
}
字符串
我尝试了堆栈溢出中的所有解决方案,但无法找到原因,有人能解释一下为什么我会出现这个错误,解决方案是什么?
1条答案
按热度按时间hl0ma9xz1#
通过查看随附的屏幕截图
我认为这可能是因为默认情况下(gradle.properties)
android.enableR8.fullMode=true
使其成为android.enableR8.fullMode=false
,尝试它将创建APK