Skip to content Skip to sidebar Skip to footer

Can't Generate Signed APK In Android Studio, 'java.io.IOException'

I have a problem with generating signed APK in Android Studio. It was working fine few days ago, I dont know what went wrong. I'm getting this error for any project I try to fgener

Solution 1:

Did you tried to disbale proguard for release build?

release {
    shrinkResources false
    minifyEnabled false
    useProguard false
    multiDexEnabled true
    proguardFiles getDefaultProguardFile('proguard-android.txt'), "proguard-rules.pro"
}

if this works, you should fix our proguard config


Solution 2:

Try excluding answers-shim:

compile ('io.branch.sdk.android:library:2.+') {
    exclude module: 'answers-shim' 
}

Solution 3:

Try to add below line in your proguard file to ignore warning that you are getting as above.

-dontwarn com.crashlytics.android.answers.shim.**

Solution 4:

The problem was in answers library. There seems to be a problem in the latest version. When i downgrade the library to

compile('io.branch.sdk.android:library:2.5.9') { exclude module: 'answers-shim' }

it works fine.


Solution 5:

Problem

The same problem occurred to me after I :

  • Upgraded to Android Studio 3, then
  • in my dependency library, changed inline classes to lambdas and method references.

I thought I could freely utilize lambdas and method references as stated in Android Studio 3 release notes, I may have forgot or missed it.

Answer :

Anyway, I'm not 100% sure, but I think we still can't use lambdas and/or method references in project libraries, because as soon as I reverted all lambdas and method references in my library, I successfully re-generated my APK.


Post a Comment for "Can't Generate Signed APK In Android Studio, 'java.io.IOException'"