everyone I'm working on Flutter project but when I want to run my application I faced this error:
Execution failed for task ':app:xxxxxxxx'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade java.lang.OutOfMemoryError (no error message)
I have tried multiple solutions like:
changing the gradle.properties file to:
- gradle.properties.org.gradle.jvmargs=-xmx4608m
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
- gradle.properties.org.gradle.jvmargs=-xmx4608m
Restarting my Pc
Checking that I have enougth memory in my Pc and My phone
Raising the minSdkVersion to 30
but it seems not to help too much.
CodePudding user response:
Considering the lack of information you've provided, I can only consider the fact that the good practice for creating mobile applications, judging by the fact that a mobile device's memory is usually lower( and the memory allocation is much slower ), when compared to a computer's memory and memory allocation speed, is to store your information in a database and access the needed information using queries.
CodePudding user response:
A few things you can try:
- Run
flutter clean
andflutter upgrade
in the terminal - Uninstall and reinstall the app
- (Android Studio) File -> Invalidate Caches and Restart
- Restart your computer