Reputation: 2574
I am trying to take proguard signed APK. It was working perfectly before add the dependency for InMobi
Am getting the warning as
You may need to add missing library jars or update their versions.
Warning:there were 2 unresolved references to classes or interfaces.
If your code works fine without the missing classes, you can suppress
the warnings with '-dontwarn' options.
No am using the dependency as " compile 'com.inmobi.monetization:inmobi-ads:6.0.3'" .Before am using jar file for Inmobi.
When I am using the InMobi older version 5.0.4 ,that is jar file, that time proguard have no issue.
Issue only come when using InMobi new version 6.0.3
Am using proguard rule that given in the site
-keepattributes SourceFile,LineNumberTable
-keep class com.inmobi.** { *; }
-keep public class com.google.android.gms.**
-dontwarn com.google.android.gms.**
-dontwarn com.squareup.picasso.**
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient{
public *;
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info{
public *;
}
-keep class com.moat.** {*;}
-dontwarn com.moat.**<br>
Still am getting the issue
Upvotes: 0
Views: 510
Reputation: 20268
The real error that Proguard
throws is:
Warning:com.moat.analytics.mobile.inm.ay: can't find referenced class com.moat.analytics.mobile.inm.ay$com.moat.analytics.mobile.inm.bb
That means that the library .apk has been obfuscated and we don't really know what class is causing the problem, however we know, that com.moat.analytics.mobile.inm
package is causing the problem.
Having this in mind and investigating the Proguard
content carefully leads to the last line:
-dontwarn com.moat.**<br>
There should not be any <br>
at the end. It causes this line to have incorrect syntax and proguard
just ignores it. Remove <br>
and everything will be correct and the project will compile.
Upvotes: 1