Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 10 遇到兼容性问题,读取不到手机的相册图片 #111

Closed
snowdream opened this issue Dec 26, 2020 · 1 comment
Closed

Comments

@snowdream
Copy link

怀疑和Android 10 分区存储有关系。

WechatIMG696

参考文档:https://guolin.blog.csdn.net/article/details/105419420

@snowdream
Copy link
Author

snowdream commented Dec 26, 2020

自己解决了,供参考:

  1. 升级 Glide 依赖版本:
    implementation 'com.github.bumptech.glide:glide:4.11.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
  1. 修改 cordova 配置文件。
    依据 cordova 文档,增加 AndroidX 支持。
    https://cordova.apache.org/announcements/2020/06/29/cordova-android-9.0.0.html
    gradle.properties keeps getting overwritten apache/cordova-android#1058
    在 Android 配置部分添加:
<platform name="android">  
    <preference name="AndroidXEnabled" value="true" />
</platform>  
  1. 修改 cordova 的配置文件 config.xml (可能主要是这个原因)
 <edit-config xmlns:android="http://schemas.android.com/apk/res/android" file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
        <application android:requestLegacyExternalStorage="true" /> 
</edit-config>
</platform>  ```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant