miguelpruivo/flutter_file_picker

The Android platform returned an unexpected value for selecting a file path

molihuan opened this issue · 2 comments

Describe the bug
I don't think this is a bug. On the Android platform, the file I want to select is "/storage/emulated/0/content/1. txt". I expect the path it returns to be the string "/storage/emulated/0/tencent/1.txt", but file_ Picker 6.0.0 returns "/data/user/0/com.molihuan.note/cache/file_picker/1.txt", which does not meet my requirements. All I need is this path string. This applies to all Android versions. May I know what to do, what I need to configure (such as passing in xxx parameters), and if configuration is not possible, how can I change the source code.

Waiting for your reply online, thank you very much !!!

Platform

  • [*] Android

Platform OS version
All Android Version

How are you picking?

                  FilePickerResult? result =
                      await FilePicker.platform.pickFiles();
                  if (result != null) {
                    PlatformFile file = result.files.first;
                    print('path: ${file.path}');
                    noteFilePathEditController.text = file.path ?? "";
                  } else {
                    
                  }

Flutter Version details
[!] Flutter (Channel stable, 3.13.7, on Microsoft Windows [版本 10.0.19043.1586], locale zh-CN)
• Flutter version 3.13.7 on channel stable at C:\Users\moli\fvm\default
! Warning: flutter on your path resolves to
E:\DesktopSpace\Development\Environment\FlutterSDK\cache\3.13.7\bin\flutter, which is not inside your current
Flutter SDK checkout at C:\Users\moli\fvm\default. Consider adding C:\Users\moli\fvm\default\bin to the front of
your path.
! Warning: dart on your path resolves to E:\DesktopSpace\Development\Environment\FlutterSDK\cache\3.13.7\bin\dart,
which is not inside your current Flutter SDK checkout at C:\Users\moli\fvm\default. Consider adding
C:\Users\moli\fvm\default\bin to the front of your path.
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 2f708eb839 (4 weeks ago), 2023-10-09 09:58:08 -0500
• Engine revision a794cf2681
• Dart version 3.1.3
• DevTools version 2.25.0
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
• If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly
to perform update checks and upgrades.

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at E:\DesktopSpace\Development\Environment\Androidstudio\sdk
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = E:\DesktopSpace\Development\Environment\Androidstudio\sdk
• Java binary at: E:\DesktopSpace\Development\Environment\Androidstudio\Androidstudio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
• All Android licenses accepted.

[√] Chrome - develop for the web
• Chrome at C:\Users\moli\AppData\Local\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Professional 2019 16.11.24)
• Visual Studio at E:\DesktopSpace\Development\Environment\vs2019\Professional
• Visual Studio Professional 2019 version 16.11.33328.57
• Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2022.3)
• Android Studio at E:\DesktopSpace\Development\Environment\Androidstudio\Androidstudio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• android-studio-dir = E:\DesktopSpace\Development\Environment\Androidstudio\Androidstudio
• Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)

[√] Connected device (5 available)
• GM1910 (mobile) • 127.0.0.1:5555 • android-x64 • Android 9 (API 28)
• GM1910 (mobile) • emulator-5554 • android-x64 • Android 9 (API 28)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [版本 10.0.19043.1586]
• Chrome (web) • chrome • web-javascript • Google Chrome 118.0.5993.118
• Edge (web) • edge • web-javascript • Microsoft Edge 114.0.1823.82 (unsupported)

[√] Network resources
• All expected network resources are available.

This issue is stale because it has been open for 14 days with no activity.

This issue was closed because it has been inactive for 14 days since being marked as stale.