Paw*_*wel 13 android proguard google-play-services
升级到Google Play服务v23后,我在尝试在Eclipse中导出已签名的应用程序时看到此消息:
Proguard returned with error code 1. See console
Warning: com.google.android.gms.common.GooglePlayServicesUtil: can't find referenced class android.content.pm.PackageInstaller
Warning: com.google.android.gms.common.GooglePlayServicesUtil: can't find referenced class android.content.pm.PackageInstaller$SessionInfo
Warning: com.google.android.gms.common.GooglePlayServicesUtil: can't find referenced class android.content.pm.PackageInstaller
Warning: com.google.android.gms.common.GooglePlayServicesUtil: can't find referenced class android.content.pm.PackageInstaller$SessionInfo
Warning: com.google.android.gms.common.GooglePlayServicesUtil: can't find referenced method 'android.content.pm.PackageInstaller getPackageInstaller()' in class android.content.pm.PackageManager
Warning: com.google.android.gms.internal.zzif: can't find referenced method 'void setMixedContentMode(int)' in class android.webkit.WebSettings
You should check if you need to specify additional program jars.
Warning: there were 4 unresolved references to classes or interfaces.
You may need to specify additional library jars (using '-libraryjars').
Warning: there were 2 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile them and try again.
Alternatively, you may have to specify the option
'-dontskipnonpubliclibraryclassmembers'.
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)
Run Code Online (Sandbox Code Playgroud)
-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}
-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}
-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}
-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}
Run Code Online (Sandbox Code Playgroud)
并尝试添加
-keep class android.content.pm.PackageInstaller.**
Run Code Online (Sandbox Code Playgroud)
到proguard-project.txt,但这没有帮助.
我错过了什么?
小智 46
嘿,我有完全相同的错误,我通过添加修复它:
-keep class com.google.android.gms.** { *; }
-dontwarn com.google.android.gms.**
Run Code Online (Sandbox Code Playgroud)
到我的proguard.cfg
Pet*_*nan 11
我有同样的问题,但使用Android Studio.基于Lary Ciminera的解决方案,我补充道
-dontwarn com.google.android.gms.**
Run Code Online (Sandbox Code Playgroud)
到proguard-project.txt.
我通过将它添加到proguard-project.txt来修复它:
-keep class android.content.pm.PackageInstaller
-keep class android.content.pm.PackageInstaller$SessionInfo
-keep class android.content.pm.PackageManager
-dontwarn android.content.pm.PackageInstaller
-dontwarn android.content.pm.PackageInstaller$SessionInfo
-dontwarn android.content.pm.PackageManager
-keep class android.webkit.WebSettings
-dontwarn android.webkit.WebSettings
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
10591 次 |
| 最近记录: |