Android Q Android 10 报错 .jpeg: open failed: EACCES (Permission denied)

在 AndroidManifest.xml 中加入 android:requestLegacyExternalStorage="true" ,如下:

android:requestLegacyExternalStorage="true"

 绕了很大弯路,基本上重写了权限框架,

 1   <application
 2         android:name=".App"
 3         android:allowBackup="true"
 4         android:icon="@drawable/logo"
 5         android:label="@string/app_name"
 6         android:requestLegacyExternalStorage="true"
 7         android:roundIcon="@drawable/logo"
 8         android:supportsRtl="true"
 9         android:theme="@style/AppTheme"
10         android:usesCleartextTraffic="true"
11 
12 。。。。。

 https://developer.huawei.com/consumer/cn/doc/50127

猜你喜欢

转载自www.cnblogs.com/endv/p/12164605.html