相关疑难解决方法(0)

proguard地狱 - 找不到引用的类

所以,我TRYING释放一些软件,但Proguard的是让我头疼.

当我尝试使用proguard导出时,我收到很多警告,即"找不到引用的类"

例如:

[2011-08-07 17:44:37 - GAME] Warning: org.simpleframework.xml.stream.StreamReader: can't find referenced class javax.xml.stream.events.XMLEvent
[2011-08-07 17:44:37 - GAME] Warning: there were 52 unresolved references to classes or interfaces.
[2011-08-07 17:44:37 - GAME]          You may need to specify additional library jars (using '-libraryjars'),
[2011-08-07 17:44:37 - GAME]          or perhaps the '-dontskipnonpubliclibraryclasses' option.
[2011-08-07 17:44:37 - GAME] java.io.IOException: Please correct the above warnings first.
[ 
Run Code Online (Sandbox Code Playgroud)

警告似乎与simpleframework有关,所以在我的proguard配置文件中我添加了以下内容:

-libraryjars pathtoprojecttolibs\simple-xml-2.4.jar
Run Code Online (Sandbox Code Playgroud)

pathtoprojecttolibs我的项目引用的jar的路径在哪里.

这没什么区别.

如果simpleframework引用javax我可以告诉proguard也忽略它吗?

有任何想法吗?

android proguard

125
推荐指数
3
解决办法
7万
查看次数

ProGuard:找不到引用的com.google.android.gms.R类

在Android SDK管理器中进行一些更新之后,我尝试使用签名的apk来获取:

ProGuard: [] Warning: com.google.android.gms.auth.GoogleAuthUtil: 
  can't find referenced class com.google.android.gms.R
ProGuard: [] Warning: com.google.android.gms.auth.GoogleAuthUtil: 
  can't find referenced class com.google.android.gms.R$string
...
etc.
Run Code Online (Sandbox Code Playgroud)

如果设置-dontwarn com.google.android.gms.**编译没问题.但是在运行之后,我得到许多类似的报告错误(来自许多设备):

Caused by: android.view.InflateException: Binary XML file line #32: 
  Error inflating class com.google.android.gms.common.SignInButton
Run Code Online (Sandbox Code Playgroud)

在我的设备上一切都好.在更新之前,我没有ProGuard警告,所有工作都完美无缺.怎么修理?

android proguard google-play-services

69
推荐指数
2
解决办法
5万
查看次数

几个新的Proguard在Multidex项目中发布了Google Play服务v10.2.6到v11.0.0

我更新了我们的应用程序以使用最新的Android Firebase SDK v11.0.0(https://firebase.google.com/support/release-notes/android#20170607),突然出现了一堆新的proguard错误,FYI在proguard之前,一切都运转良好.

之前:

compile 'com.google.firebase:firebase-messaging:10.2.6'
compile 'com.google.android.gms:play-services-vision:10.2.6'
Run Code Online (Sandbox Code Playgroud)

后:

compile 'com.google.firebase:firebase-messaging:11.0.0'
compile 'com.google.android.gms:play-services-vision:11.0.0'
Run Code Online (Sandbox Code Playgroud)

问题是它似乎不是一个简单的新缺失的proguard条目,但它似乎打破了整个事情,突然其他几个库似乎受到这种变化的影响.

这些是与GMS相关的Proguard问题:

Note: the configuration keeps the entry point 'com.google.android.gms.ads.identifier.AdvertisingIdClient { com.google.android.gms.internal.zzfd zza(android.content.Context,com.google.android.gms.common.zza); }', but not the descriptor class 'com.google.android.gms.common.zza'
Note: the configuration keeps the entry point 'com.google.android.gms.flags.impl.FlagProviderImpl { void init(com.google.android.gms.dynamic.IObjectWrapper); }', but not the descriptor class 'com.google.android.gms.dynamic.IObjectWrapper'
Note: the configuration keeps the entry point 'com.google.android.gms.measurement.AppMeasurement { AppMeasurement(com.google.android.gms.internal.zzchx); }', but not the descriptor class 'com.google.android.gms.internal.zzchx'
Note: the configuration keeps the entry point 'com.google.android.gms.measurement.AppMeasurement { …
Run Code Online (Sandbox Code Playgroud)

android firebase google-play-services android-proguard okhttp3

8
推荐指数
1
解决办法
1826
查看次数