Skip to content

target 29 下载报权限异常 #237

@fonuhuolian

Description

@fonuhuolian

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就可以了

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions