类“ Ljsqlite /数据库”中没有“ J”字段“句柄”;或其超类

时间:2018-07-05 17:43:16

标签: android proguard android-proguard reactivex

使用库io.reactivex:rxandroid:1.2.1的项目在发行版本上引起问题。我认为必须将其添加到proguard中,但是我的尝试失败了。如果有人熟悉此库,您是如何将其添加到proguard的?

我的PROGUARD条目

-dontwarn io.reactivex.**
-keep class io.reactivex.** { *; }
-dontwarn jsqlite.Database
-keep class jsqlite.Database { *; }

此问题导致崩溃,仅适用于发行版

  

致命异常:java.lang.IllegalStateException:致命异常   在Scheduler.Worker线程上抛出。          在rx.internal.schedulers.ScheduledAction.run(未知来源)          在java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:428)          在java.util.concurrent.FutureTask.run(FutureTask.java:237)          在java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)          在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)          在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:607)          在java.lang.Thread.run(Thread.java:762)

更详细的崩溃信息如下

  

由java.lang.NoSuchFieldError引起:类中没有“ J”字段“ handle”   “ Ljsqlite /数据库;”或其超类          在jsqlite.Database.internal_init(未知来源)          位于jsqlite.Database。(未知来源)          在rx.internal.operators.OnSubscribeFromCallable.call(未知来源)          在rx.internal.operators.OnSubscribeFromCallable.call(未知来源)          在rx.Observable.unsafeSubscribe(未知来源)          在rx.internal.operators.OperatorSubscribeOn $ 1.call(未知源)          在rx.internal.schedulers.CachedThreadScheduler $ EventLoopWorker $ 1.call(未知   资源)          在rx.internal.schedulers.ScheduledAction.run(未知来源)          在java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:428)          在java.util.concurrent.FutureTask.run(FutureTask.java:237)          在java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:272)          在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)          在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:607)          在java.lang.Thread.run(Thread.java:762)

0 个答案:

没有答案