有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java ProGuard在安卓上失败了。小装置。空间

我在尝试构建一个小型变体时遇到了一个问题。ProGuard抱怨安卓.widget.Space。配置没有什么特别之处:

proguardFiles getDefaultProguardFile('proguard-安卓.txt'), 'proguard-rules.pro'

proguard规则。pro

-dontwarn okio.**
-dontwarn retrofit2.**
-dontwarn javax.annotation.**
-dontwarn javax.inject.**
-dontwarn sun.misc.Unsafe
-dontwarn afu.org.checkerframework.**
-dontwarn org.checkerframework.**
-dontwarn com.google.**
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
-keep class com.安卓plot.** { *; }
-keep class com.woxthebox.draglistview.** { *; }
-keep class com.jakewharton.threetenabp.** { *; }
-keep class me.srodrigo.** { *; }
-keep class com.squareup.retrofit2.** { *; }

到目前为止,我已经尝试添加

-keep class 安卓.widget.Space

如警告所示,但抛出相同的错误。也试过

-dontwarn 安卓.widget.Space

同样的结果。自上次成功构建以来,我们所做的最重要的改变是从旧的Android支持库切换到AndroidX。我们收到的错误/警告是:

Note: the configuration explicitly specifies '安卓.widget.Space' to keep library class '安卓.widget.Space' Note: the configuration explicitly specifies '安卓.widget.Space' to keep library class '安卓.widget.Space' Note: there were 3 references to unknown classes. You should check your configuration for typos. (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass) Note: there were 1 references to unknown class members. You should check your configuration for typos. Note: there were 277 unkept descriptor classes in kept class members. You should consider explicitly keeping the mentioned classes (using '-keep'). (http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass) Note: there were 2 library classes explicitly being kept. You don't need to keep library classes; they are already left unchanged. (http://proguard.sourceforge.net/manual/troubleshooting.html#libraryclass) Note: there were 19 unresolved dynamic references to classes or interfaces. You should check if you need to specify additional program jars. (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass) Warning: there were 6 unresolved references to library class members. You probably need to update the library versions. (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember) Warning: Exception while processing task java.io.IOException: Please correct the above warnings first. Thread(Tasks limiter_18): destruction

谢谢你的帮助


共 (0) 个答案