Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue while running flutter build apk #57

Open
mohammadamirnm opened this issue Oct 31, 2020 · 1 comment
Open

Issue while running flutter build apk #57

mohammadamirnm opened this issue Oct 31, 2020 · 1 comment

Comments

@mohammadamirnm
Copy link

I encounter an issue with the package when I try to build an APK with the "flutter build apk" command.
the error is:

                                                                        
* What went wrong:                                                      
Execution failed for task ':app:processReleaseResources'.               
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed                                    
     /Users/username/appLocation/android/app/src/main/AndroidManifest.xml:9:5-33: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 34s                                                  
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done                      95.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 image_crop...
Running Gradle task 'assembleAarRelease'...                             
Running Gradle task 'assembleAarRelease'... Done                    1.6s


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'image_crop'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/Users/mohammadamir/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/image_crop-0.3.4/android/local.properties'.

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


The plugin image_crop could not be built due to the issue above.
@furaiev
Copy link

furaiev commented Oct 31, 2020

error: attribute android:requestLegacyExternalStorage not found. means that you should add it to your android manifest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants