-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proguard fails on 1.4-SNAPSHOT #265
Comments
mmm that's strange. What happens when you turn off proguard in your app, does LeakCanary work just fine? |
I have the same issue. Proguard file:
Warnings:
Probably this is unsafe. |
@SandroMachado Which java version you compiled on? |
@iNoles I am not compiling it, I am just importing the
|
Same here. |
@SandroMachado's solution worked for me as well. I don't think it is unsafe, because as long as you include |
Should be fixed by #308 |
What do these ProGuard fixes have to do with the Marshmallow M version? I had to do the same thing in my ProGuard config as mentioned in #265 (comment) |
Added here: |
It is working fine here with the latest update. No problems with the current proguard consumer files included in the library. BTW, I am just using the proguard with my @rogerhu are you including any other proguard configuration? The latest version (1.4 beta 1) already includes the required proguard configuration file, so I don't need to add any other special rule at least with it enable only for the release configuration. |
rechecking...i noticed leak canary actually wasn't working for me until i brought these proguard lines in...but on a new project leakcanary works fine. trying to figure out what's different |
The problem happens for debug builds, not for release builds because release compiles are using Change your relaseCompile dependency and you will see the same problem: dependencies {
releaseCompile 'com.squareup.leakcanary:leakcanary-android:1.4-SNAPSHOT'
} I've updated the PR for consumer-proguard-rules.pro to ensure that the library includes these definitions by default. |
Well. Same for me. Everything was fine. I don't know why this error occurs...
|
I am also seeing these warnings. There are started happening when i updated to 2.0.0-beta7 version of the Android Gradle Plugin. The warnings are shown when the |
Help welcome! We use jarjar & Proguard to embed perflib into LeakCanary. perflib depends on Guava, so Proguard allows us to shrink it down to the bare minimum. I think Proguard is a bit too agressive and removes inner classes attributes that later makes it unhappy when integrating into another app. Proguard is weird. |
The warnings are there but they are not fatal. The Proguard rules set not to error on them (https://github.com/square/leakcanary/blob/master/leakcanary-android/consumer-proguard-rules.pro) I don't think this is a blocking issue. And it should probably be opened as a separate issue. |
After reading further, |
I'm running into these warnings without using Proguard. Are there any fixes to silence these for non-proguard users? |
when I or @jrodbx can get to it. Sorry, I can't provide any estimate, we have a tight deadline at work. |
@pyricau fair enough, thanks for the great library anyway! |
My build was also just breaking without me using proguard. It worked fine for some time. |
Waiting for the release ;) Thank you guys |
@jrodbx updated the |
oops, forgot to update this here. Thanks for taking point, @WonderCsabo! |
I've got this:
Even though in my proguard.cfg:
The text was updated successfully, but these errors were encountered: