Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Instabug Proguard issue

I have a problem including instabug library in an obfuscated project (all other third party libraries are ok).

The error I get is following ( I know there have been other question about this error message, but my problem appears only with instabug, and none of the proposed solutions work for it ).

Error:Execution failed for task ':app:packageRelease'.

Unable to compute hash of C:\Projects\ProguardExample\app\build\intermediates\classes-proguard\release\classes.jar

I have added some statements to my configuration file when trying to solve the problem.

-dontwarn android.support.**
-keep class android.support.v7.** { *; }
-keep interface android.support.v7.** { *; }
-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.**
-keep class com.instabug.** { *; }

// here I tried also to change the proguard-project.txt

and to my proguard-rules.pro

-dontwarn java.nio.file.Files
-dontwarn java.nio.file.Path
-dontwarn java.nio.file.OpenOption
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement

Here is how my build.gradle looks like.

   buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.config
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    compile 'com.android.support:appcompat-v7:23.0.1'
    //compile 'com.github.danieltwagner:android-async-logger:0.1.0@aar'
    compile 'com.instabug.library:instabugsupport:1+'
    // compile 'org.apache.commons:commons-collections4:4.0'
}

I would be very thankful if you could guide me towards solving this problem. Even if you don't know its solution, but suspect in which area, should I research to find it, please share with me :)

like image 251
Radostina Poulain Radost Avatar asked Nov 23 '15 11:11

Radostina Poulain Radost


1 Answers

The guys from instabug helped me out via email. So here is the solution (that totally works for me) - add those statements to you proguard-rules.pro

-dontwarn org.apache.http.**
-dontwarn android.net.http.AndroidHttpClient
-dontwarn com.google.android.gms.**
-dontwarn com.android.volley.toolbox.**
-dontwarn com.instabug.**
like image 88
Radostina Poulain Radost Avatar answered Oct 03 '22 19:10

Radostina Poulain Radost