1***@qq.com
1***@qq.com
  • 发布:2016-12-26 12:38
  • 更新:2016-12-26 12:53
  • 阅读:1569

安卓5.0以上系统无法调plus.zip.compressImage

分类:Native.js
Zip

离线打包,把需要的nopermission.jar包引进项目了,调用plus.zip.compressImage时,4.2.2的系统可以成功,但是在5.0+的系统上调用崩溃,且抛出如下异常。离线打包的注意事项没有说明,是不是需要引入一些东西或者配置呢?在H builder里直接跑项目没出现这个问题,但是离线打包就报错了。
12-26 11:57:28.141: W/System.err(8351): java.lang.RuntimeException: java.lang.Throwable: A WebView method was called on thread 'pool-2-thread-2'. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 1) {3f5359a4} called on null, FYI main Looper is Looper (main, tid 1) {3f5359a4})
12-26 11:57:28.141: W/System.err(8351): at android.webkit.WebView.checkThread(WebView.java:2289)
12-26 11:57:28.141: W/System.err(8351): at android.webkit.WebView.getUrl(WebView.java:1357)
12-26 11:57:28.141: W/System.err(8351): at io.dcloud.common.adapter.ui.AdaWebview.obtainFullUrl(AdaWebview.java:231)
12-26 11:57:28.141: W/System.err(8351): at io.dcloud.feature.pdr.a$b.a(CompressImage.java:225)
12-26 11:57:28.141: W/System.err(8351): at io.dcloud.feature.pdr.a$b.a(CompressImage.java:196)
12-26 11:57:28.141: W/System.err(8351): at io.dcloud.feature.pdr.a.b(CompressImage.java:67)
12-26 11:57:28.141: W/System.err(8351): at io.dcloud.feature.pdr.a$1.run(CompressImage.java:43)
12-26 11:57:28.141: W/System.err(8351): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
12-26 11:57:28.141: W/System.err(8351): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
12-26 11:57:28.141: W/System.err(8351): at java.lang.Thread.run(Thread.java:818)
12-26 11:57:28.141: W/System.err(8351): Caused by: java.lang.Throwable: A WebView method was called on thread 'pool-2-thread-2'. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 1) {3f5359a4} called on null, FYI main Looper is Looper (main, tid 1) {3f5359a4})
12-26 11:57:28.141: W/System.err(8351): at android.webkit.WebView.checkThread(WebView.java:2279)

2016-12-26 12:38 负责人:无 分享
已邀请:
BoredApe

BoredApe - 有问题就会有答案。

参考“Feature列表.xls”文档确定应用中使用到的扩展API,在AndroidManifest.xml文件中配置对应的权限

  • 1***@qq.com

    是Feature-Android.xls这文档么?但是这个只是陪权限啊。人家问的这个不是权限的问题啊,Android 4.4以上不让在Webview的调用方法在另一线程里面被调用啊。我这里也遇到这个问题了。


    2017-01-20 12:14

该问题目前已经被锁定, 无法添加新回复