Jodd 是一个很棒的库,但是当我在 Proguard 的应用程序的发布版本中使用它时遇到了麻烦。它发生在以下代码行引发下面详述的异常L
BeanCopy.beans(source, destination).copy();
然而,在异常发生之前,如果我选择在 gradle 构建期间不禁止显示警告,则会出现几个涉及未包含在 Android 运行时中的类的警告,例如:
Warning:jodd.util.ClipboardUtil: can't find referenced class java.awt.datatransfer.StringSelection
这是抛出的异常:
11-19 23:45:00.458 16897-16897/com.myfab5.mobile.debug D/AndroidRuntime: Shutting down VM
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: FATAL EXCEPTION: main
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: Process: com.myfab5.mobile.debug, PID: 16897
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: java.lang.ExceptionInInitializerError
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at b.e.c.a(Unknown Source)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at b.a.g.a(Unknown Source)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at b.a.g.a(Unknown Source)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at b.a.g.b(Unknown Source)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at b.a.a.a(Unknown Source)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at com.myApp.android.services.copyBeans(Unknown Source)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at com.google.android.gms.location.internal.zzk$zzb.handleMessage(Unknown Source)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at android.os.Looper.loop(Looper.java:145)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6837)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: Caused by: java.lang.IllegalArgumentException: Invalid module: class b.e.j
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at b.a.a(Unknown Source)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime: at b.e.j.a(Unknown Source)
11-19 23:45:00.468 16897-16897/com.myfab5.mobile.debug E/AndroidRuntime:
有谁知道如何解决这一问题?Jodd 可以与 Proguard 一起成功使用吗?