astar
astar
  • 发布:2017-11-21 11:58
  • 更新:2019-05-18 14:21
  • 阅读:4584

Android7解决plus.runtime.openFile方法打开文件无响应问题(需本地打包并修改SDK)

分类:HTML5+

需修改的类:pdr.jar\io\dcloud\common\adapter\util\PlatformUtil.class

具体方法请参见:解决 Android N 7.0 上 报错:android.os.FileUriExposedException

另外调试中还发现一个问题:

** PLEASE READ ****

  • New versions of the Android SDK no longer support the Crypto provider.
  • If your app was relying on setSeed() to derive keys from strings, you
  • should switch to using SecretKeySpec to load raw key bytes directly OR
  • use a real key derivation function (KDF). See advice here :
  • http://android-developers.blogspot.com/2016/06/security-crypto-provider-deprecated-in.html


此问题的解决请参见:Android:7.0 后加密库 Crypto 被废弃后的爬坑指南
需修改的类:pdr.jar\io\dcloud\common\adapter\util\DCloudTrustManager.class

希望dcloud团队能更新此类问题

0 关注 分享

要回复文章请先登录注册

willKing

willKing

回复 Lspring :
添加在哪个文件?
2019-05-18 14:21
3***@qq.com

3***@qq.com

回复 Lspring :
有没有具体一点的操作
2018-09-12 15:34
Lspring

Lspring

离线打包的时候添加:
StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();
StrictMode.setVmPolicy(builder.build());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
builder.detectFileUriExposure();
}
2018-07-03 20:44