3

I m using This package to get download path in android which work well. By using this Package I get /storage/emulated/0/Download which I want.

Problem: When I ran flutter run --release it throws an error.

Launching lib\main.dart on SM J700F in release mode...
Running Gradle task 'assembleRelease'...

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':downloads_path_provider:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\Users\Sandeep Sharma\.gradle\caches\transforms-2\files-2.1\56f020e9c27d6a807cc1a74760f6e28d\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/fontVa
riationSettings not found.

     C:\Users\Sandeep Sharma\.gradle\caches\transforms-2\files-2.1\56f020e9c27d6a807cc1a74760f6e28d\core-1.0.0\res\values\values.xml:57:5-88:25: AAPT: error: resource android:attr/ttcInd
ex not found.


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 34s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done                     158.0s (!)
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin cloud_firestore...
The plugin cloud_firestore could not be built due to the issue above.
Running Gradle task 'assembleAarRelease'...

if This can't be solved then suggest being how to get this path /storage/emulated/0/Download or another way around.

Update: I just saw Repo of Downloads_path_provider which says

This plugin has lots of inconsistencies and should no longer be used. Feel free to fork and tweak it.

what should I use to get this path /storage/emulated/0/Download. Thanks.

5
  • Does this works in debug mode? Commented May 3, 2020 at 15:39
  • yes. it works in debug mode. Commented May 3, 2020 at 15:41
  • do you want internal or external storage path? Commented May 3, 2020 at 15:44
  • Internal would be better if internal doesn't work then of course external. Commented May 3, 2020 at 15:45
  • Same happened with me Commented Jun 5, 2020 at 7:16

2 Answers 2

2

instead use the ext_storage plugin:

ExtStorage.getExternalStoragePublicDirectory(ExtStorage.DIRECTORY_DOWNLOADS);

I had the same issue and worked for me.

Sign up to request clarification or add additional context in comments.

Comments

0

You have to use the official package provided by the flutter known as path_provide and use the getDownloadsDirectory() method to get the path.

1 Comment

I have already tried this. This is not for android Unsupported operation: Functionality only available on macOS

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.