Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

proguard doesnt ignore referenced libraries

I use proguard, in proguard-project.txt, I have line for ignoring referenced classes

-dontwarn com.google.ads.**

The log says:

Warning: com.flurry.android.ab: can't find referenced class com.google.ads.InterstitialAd Warning: com.flurry.android.ab: can't find referenced class com.google.ads.InterstitialAd Warning: com.flurry.android.ab: can't find referenced class com.google.ads.InterstitialAd Warning: com.flurry.android.ab: can't find referenced class com.google.ads.AdRequest Warning: com.flurry.android.ab: can't find referenced class com.google.ads.AdRequest

..........

You should check if you need to specify additional program jars. Warning: there were 277 unresolved references to classes or interfaces. You may need to specify additional library jars (using '-libraryjars'). java.io.IOException: Please correct the above warnings first. at proguard.Initializer.execute(Initializer.java:321) at proguard.ProGuard.initialize(ProGuard.java:211) at proguard.ProGuard.execute(ProGuard.java:86) at proguard.ProGuard.main(ProGuard.java:492)

I included line -libraryjars ./libs/FlurryAgent.jar to congig file. What is my problem?

like image 760
Paul Avatar asked Mar 22 '13 11:03

Paul


2 Answers

As you have tried, you should put this single line in proguard-project.txt:

-dontwarn com.google.ads.**

You do have to make sure that ProGuard is actually using this configuration file, with this line in project.properties:

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

This is the standard line for Android SDK r20 or higher (older versions used just proguard.config=proguard.cfg, in which case you had to specify the entire configuration, instead of relying on the one in the SDK).

like image 199
Eric Lafortune Avatar answered Nov 20 '22 20:11

Eric Lafortune


Just add these lines to your proguard-android.txt.

# Flurry SDK support
-dontwarn com.google.ads.**
-dontwarn com.inmobi.androidsdk.**
-dontwarn com.jumptap.adtag.**
-dontwarn com.millennialmedia.android.**
-dontwarn com.mobclix.android.sdk.**
-dontwarn com.flurry.android.monolithic.sdk.**
like image 2
boyal Avatar answered Nov 20 '22 21:11

boyal