我正在尝试使用 proguard 签名的 APK。在添加对 InMobi 的依赖项之前,它运行良好
我收到警告
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.
没有将依赖项用作 “compile 'com.inmobi.monetization:inmobi-ads:6.0.3'”。在使用 Inmobi 的 jar 文件之前。
当我使用 InMobi 旧版本 5.0.4 即 jar 文件时,那个时候 proguard 没有问题。
仅在使用 InMobi 新版本 6.0.3 时出现问题
我正在使用网站中给出的 proguard 规则
-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>
仍然遇到问题