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

target 29 下载报权限异常 #237

Open
fonuhuolian opened this issue Jul 31, 2020 · 1 comment
Open

target 29 下载报权限异常 #237

fonuhuolian opened this issue Jul 31, 2020 · 1 comment

Comments

@fonuhuolian
Copy link

fonuhuolian commented Jul 31, 2020

E/ContentValues: onDownloadError: SD card isn't available, please check SD card and permission: WRITE_EXTERNAL_STORAGE.
You must pay attention to Android6.0 RunTime Permissions: https://github.com/yanzhenjie/AndPermission.
Failed to create file: /storage/emulated/0/oa.apk.nohttp

target 29 时 走这个回调
/**
* An error occurred while downloading.
*
* @param what which is used to mark the download tasks.
* @param exception error types. Error types include the following:
*

{@link NetworkError} The network is not available, please check
* the network.


*

{@link ServerError} When the response code is more than 400, you
* need to look at the response code specific how much is the judgement is something wrong.


*

{@link StorageReadWriteError} An error occurred when read/write
* memory CARDS, please check the memory card.


*

{@link StorageSpaceNotEnoughError} There is insufficient space on
* the memory card, please check the memory card.


*

{@link TimeoutError} Timeout connecting to the server or read the
* file.


*

{@link UnKnownHostError} Is not found in the network of the
* target server.


*

{@link URLError} Download url is wrong.


*/
void onDownloadError(int what, Exception exception);

已经动态存储权限获取了 把target改成28就可以了

@kcjian
Copy link

kcjian commented Aug 9, 2021

API30,WRITE_EXTERNAL_STORAGE 权限有还报错,咋整啊 @yanzhenjie

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

2 participants