0

Everything was working fine before upgrading flutter to v1.17.3,

Already tried:

flutter clean

And

flutter downgrade

Error that I'm getting (Build Fail):

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\Users\Shamuvel\Desktop\App Development\PROJECTS\Grocery Store\groci\android\Store\groci\android\app\src\main\AndroidManifest.xml:8:5-47:19: AAPT: error: attribute android:requestLegacyExternalStorage 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 1m 27s
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 path_provider...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'path_provider'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

* 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 5s

Exception: The plugin path_provider could not be built due to the issue above.

gradle.properties file:

org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true

Solutions Appreciated

Thanks!

3 Answers 3

9

Finally, switching compileSdkVersion & targetSdkVersion from 28 to 29 in android/app/build.gradle file worked.

Check these solutions as well, might help you:-

AAPT: error: attribute android:requestLegacyExternalStorage not found

Flutter: Debug build successful but release gives error

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

Comments

1

Fix it with remove android:networkSecurityConfig="@xml/network_security_config" from android manifest.

Comments

0

Go to File->Project Structure->Project->Project SDK and select the latest SDK.

I am a rookie in flutter app development and faced this problem in the very first app I was building.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.