0
votes

I am trying to create a release build for my Xamarin.Android application but I am running into problems when I enable Proguard. I have resolved the issues related to Android-SDK being installed in Program Files by creating Symlinks. I also resolved the Java 8 support issue by overwriting the Proguard bat files in Androind-SDK using Proguard 5.2.1.

And now I am running into these issues which I am not sure how to resolve:

    'com.google.android.gms.ads.doubleclick.OnCustomRenderedAdLoadedListener' (TaskId:351)
2>  Note: the configuration keeps the entry point 'com.google.android.gms.ads.formats.NativeAdView { void setNativeAd(com.google.android.gms.ads.formats.NativeAd); }', but not the descriptor class 'com.google.android.gms.ads.formats.NativeAd' (TaskId:351)
2>  Note: the configuration keeps the entry point 'com.google.android.gms.ads.search.SearchAdView { void setAdListener(com.google.android.gms.ads.AdListener); }', but not the descriptor class 'com.google.android.gms.ads.AdListener' (TaskId:351)
2>  Note: the configuration keeps the entry point 'com.google.android.gms.ads.search.SearchAdView { void setAdSize(com.google.android.gms.ads.AdSize); }', but not the descriptor class 'com.google.android.gms.ads.AdSize' (TaskId:351)
2>  Note: the configuration keeps the entry point 'com.google.android.gms.plus.PlusOneButton { void setOnPlusOneClickListener(com.google.android.gms.plus.PlusOneButton$OnPlusOneClickListener); }', but not the descriptor class 'com.google.android.gms.plus.PlusOneButton$OnPlusOneClickListener' (TaskId:351)
2>  Note: there were 7 references to unknown classes. (TaskId:351)
2>        You should check your configuration for typos. (TaskId:351)
2>        (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass) (TaskId:351)
2>  Note: there were 3 classes trying to access generic signatures using reflection. (TaskId:351)
2>        You should consider keeping the signature attributes (TaskId:351)
2>        (using '-keepattributes Signature'). (TaskId:351)
2>        (http://proguard.sourceforge.net/manual/troubleshooting.html#attributes) (TaskId:351)
2>  Note: there were 74 unkept descriptor classes in kept class members. (TaskId:351)
2>        You should consider explicitly keeping the mentioned classes (TaskId:351)
2>PROGUARD : warning : there were 144 unresolved references to classes or interfaces.
2>           You may need to add missing library jars or update their versions. (TaskId:351)
2>        (using '-keep'). (TaskId:351)
2>        (http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass) (TaskId:351)
2>  Note: there were 8 unresolved dynamic references to classes or interfaces. (TaskId:351)
2>        You should check if you need to specify additional program jars. (TaskId:351)
2>        (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass) (TaskId:351)
2>  Note: there were 4 accesses to class members by means of introspection. (TaskId:351)
2>        You should consider explicitly keeping the mentioned class members (TaskId:351)
2>        (using '-keep' or '-keepclassmembers'). (TaskId:351)
2>        (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclassmember) (TaskId:351)
2>           If your code works fine without the missing classes, you can suppress (TaskId:351)
2>           the warnings with '-dontwarn' options. (TaskId:351)
2>           (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass) (TaskId:351)
2>PROGUARD : warning : there were 2 unresolved references to program class members.
2>           Your input classes appear to be inconsistent. (TaskId:351)
2>           You may need to recompile the code. (TaskId:351)
2>           (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember) (TaskId:351)
2>  java.io.IOException: Please correct the above warnings first. (TaskId:351)
2>      at proguard.Initializer.execute(Initializer.java:473) (TaskId:351)
2>      at proguard.ProGuard.initialize(ProGuard.java:233) (TaskId:351)
2>      at proguard.ProGuard.execute(ProGuard.java:98) (TaskId:351)
2>      at proguard.ProGuard.main(ProGuard.java:538) (TaskId:351)
2>  Picked up JAVA_TOOL_OPTIONS:  -Dfile.encoding=UTF8 (TaskId:351)

Note#1: I have tried (and am currently using) "1G" for Java Max Heap Size to no avail.

Note#2: I have added the following two lines in my custom Proguard.cfg file to no avail:

-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.**

Any help would be appreciated!!

1

1 Answers

0
votes

You have two warnings about unresolved references that are not visible in the pasted build log.

Probably these warnings are harmless, and you can try to ignore them using -ignorewarnings, but I would still suggest to investigate them, e.g. because you are missing a required library dependency.