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

添加/sdcard 文件夹的访问权限方法 #69

Open
kuguazhiwang opened this issue Dec 22, 2024 · 0 comments
Open

添加/sdcard 文件夹的访问权限方法 #69

kuguazhiwang opened this issue Dec 22, 2024 · 0 comments

Comments

@kuguazhiwang
Copy link

kuguazhiwang commented Dec 22, 2024

1、修改 ./android/app/src/main/AndroidManifest.xml 文件
(1)app权限

<!--存储权限-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>

(2)application配置

<application>
	...
    android:requestLegacyExternalStorage="true"

    android:usesCleartextTraffic="true"
    ...>

(3)activity组件配置
注意:Android 12以上,组件创建添加以下属性

android:exported="true"

改过文件以后打包软件安装

2、改过文件以后打包软件、安装软件后,需要在安卓设备的设置里打开code FA 的 “所有文件访问权限”
1734863389098
我的设备是小米pad6 pro

@kuguazhiwang kuguazhiwang changed the title 添加/sdcard 文件夹的访问权限 添加/sdcard 文件夹的访问权限方法 Dec 22, 2024
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