Я просто включаю Proguard (minifyEnabled true) ... и когда я пытаюсь собрать подписанный apk, я получаю ошибку:
Причина: недопустимая запись CRC (ожидается 0x9aa3fedc, но получено 0xfeb7201b)
Исключительная ситуация при обработке задачи java.io.IOException: Не удается прочитать [D: \ AndroidStudio \ AndroidStudioSDK \ sdk \ platform \ android-27 \ android.jar] (недопустимая запись CRC (ожидается 0x9aa3fedc, но получено 0xfeb7201b))
мой Gradle.app:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.test.app"
manifestPlaceholders = [manifestApplicationId : "${applicationId}",
onesignal_app_id : "*****-****-****-****-***********",
onesignal_google_project_number: "REMOTE"]
minSdkVersion 19
targetSdkVersion 27
versionCode 8
versionName "1.8"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes.each {
it.buildConfigField 'String', 'SERVER_URL', serverUrl
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//ANDROID API
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:animated-vector-drawable:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:exifinterface:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:mediarouter-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:multidex:1.0.3'
//Google API
implementation 'com.google.android.gms:play-services-ads:17.1.2'
implementation 'com.google.android.gms:play-services-gcm:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-cast-framework:16.1.2'
implementation 'com.google.android.ads.consent:consent-library:1.0.7'
//Google Exo Player
implementation 'com.google.android.exoplayer:exoplayer:2.9.4'
implementation 'com.google.android.exoplayer:exoplayer-core:2.9.4'
implementation 'com.google.android.exoplayer:exoplayer-dash:2.9.4'
implementation 'com.google.android.exoplayer:exoplayer-hls:2.9.4'
implementation 'com.google.android.exoplayer:exoplayer-smoothstreaming:2.9.4'
implementation 'com.google.android.exoplayer:exoplayer-ui:2.9.4'
//Google Firebase Api
implementation 'com.google.firebase:firebase-core:16.0.6'
//Other Libraries
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'me.relex:circleindicator:1.2.2@aar'
implementation 'com.github.ornolfr:rating-view:0.1.2@aar'
implementation 'cn.gavinliu.android.lib:ShapedImageView:0.8.4'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'com.mobsandgeeks:android-saripaar:2.0.2'
implementation 'com.github.ixiDev:GDPRChecker:v0.2'
implementation 'com.github.halilozercan:BetterVideoPlayer:1.1.0'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
//OneSignal
implementation 'com.onesignal:OneSignal:3.9.1@aar'
//You Api
implementation files('libs/YouTubeAndroidPlayerApi.jar')
//Test Api
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
Так что я ничего не меняю, просто minifyEnabled с false на true, и я получаю ошибку.