My android application using Kotlin is throwing this exception when I try to Run \'app\' in the emulator o in my cellphone. When I build my project it runs well, with no err
I've tried all solutions and non of them helped! finally after many trying, I figured it out, just follow the tips:
yourProject/app/MYAPP_RELEASE_STORE_FILE=KEYSTROK_NAME
MYAPP_RELEASE_KEY_ALIAS=KEY_ALIAS
MYAPP_RELEASE_STORE_PASSWORD=R_PASS
MYAPP_RELEASE_KEY_PASSWORD=K_PASS
android.enableR8=true
app level build.gradle (inside android):
signingConfigs{
release{
if (project.hasProperty('MYAPP_RELEASE_STORE_FILE')) {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
}
configurations {
cleanedAnnotations
compile.exclude group: 'org.jetbrains' , module:'annotations'
}
release {
manifestPlaceholders = [analytics_deactivated: "false"]
minifyEnabled true
signingConfig signingConfigs.release
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
mac: ./gradlew clean assemble_YOUR_FAVOR_Release
win: gradlew clean assemble_YOUR_FAVOR_Release
where _YOUR_FAVOR_ is your optional favor, if you are not using any favor, just simply use assembleRelease instead of assemble_YOUR_FAVOR_Release