open_file icon indicating copy to clipboard operation
open_file copied to clipboard

Cannot open file in app bundle?

Open magic3584 opened this issue 7 months ago • 1 comments

I have followed #98 , and config

    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>

then use

    final status = await Permission.manageExternalStorage.request();
    var file = await getAssetByName("close.png");
    var r = await OpenFile.open(file.path,type:"image/png");

but comes the error:

Failed to find configured root that contains /data/data/com.xxx.xxx/app_flutter/close.png.

The console log is

I/flutter ( 7072): filePath:/data/user/0/com.xxx.xxx/app_flutter/close.png
E/MethodChannel#open_file( 7072): Failed to handle method call
E/MethodChannel#open_file( 7072): java.lang.IllegalArgumentException: Failed to find configured root that contains /data/data/com.xxx.xxx/app_flutter/close.png

The path has changed. And at the same time the close.png path is "assets/close.png" and I have used it in Image Image.asset('assets/close.png')

magic3584 avatar Nov 29 '23 10:11 magic3584

https://deposit.pictures/p/e0eb7d120f0

PUPSYANDRIK7777 avatar Dec 14 '23 23:12 PUPSYANDRIK7777