after recent update, my android studio make an error:
java.lang.NullPointerException: Cannot invoke "com.android.tools.r8.internal.Gk0.B()" because the return value of "com.android.tools.r8.internal.Jw.b()" is null
and this error avoids build release .apk file.
here is my build.gradle(app):
android {
namespace '...'
compileSdk 34
defaultConfig {
applicationId '...'
minSdk 23
targetSdk 34
versionCode 11
versionName '2.1.1'
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_18
targetCompatibility JavaVersion.VERSION_18
}
buildFeatures {
buildConfig true
}
}
dependencies {
//some dependencies
}
here's my build.gradle(Project)
plugins {
id 'com.android.application' version '8.4.1' apply false
id 'com.android.library' version '8.4.1' apply false
}
I should add I have android.enableR8=true
which is depreciated in my gradle.properties
file, however change it to true, false or even removing it doesn't change anything.
any idea how to resolve this problem?