Cannot get library banner for working with Android and Proguard

I have an Android (A) library project and an Android (B) application in Eclipse. For this setup I use Proguard, so far no problem. Now I want to add the Flurry library (.jar) to the library project, which works fine in emulator debug mode.

However, when I want to export the final and signed apk of my application using Proguard, I get a lot of warnings "cannot find the reference class ..." and the apk cannot be created.

Some of these classes:

org.joda.time.LocalDateTime org.joda.time.format.DateTimeFormatter org.xerial.snappy.Snappy com.jumptap.adtag.JtAdView ... 

So, I added the following to the proguard.cfg file:

 ... -dontskipnonpubliclibraryclassmembers -libraryjars ../libproj/libs/FlurryAgent.jar ... -keep public class com.flurry.android.FlurryAgent { *; } -keep class com.flurry.** { *; } -keep class org.codehaus.jackson.** { *; } -keep class org.apache.avro.** { *; } -keep interface com.flurry.** { *; } -keep public class org.joda.time.** { public protected *; } ... 

However, I still get sam errors :( Any ideas what I am missing here?

+4
source share
1 answer

Apparently, the flash bank has optional links to some other libraries (joda-time, snappy, ...).

Adding -keep options for missing links does not help at all, since they will only contain the specified classes, but they are missing. Instead, you should add the appropriate -dontwarn directives:

 -dontwarn com.flurry.** 

should ignore any warnings arising from confusion classes.

0
source

Source: https://habr.com/ru/post/1438500/


All Articles