I'm unable to run newly created flutter projects on any android device. I've tried a fresh install of the android sdk but still getting the same error message. I've tried the same process on a different machine and everything works fine.
The error message:
Launching lib\main.dart on SM G781B in debug mode...
Running Gradle task 'assembleDebug'...
Parameter format not correct -
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
AAPT: error: failed writing to 'C:\Users\Rhys\Documents\Dev Projects\Flutter\flutter_app_test\untitled\build\app\intermediates\runtime_symbol_list\debug\R.txt': The data is invalid. (13).
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 4s
Exception: Gradle task assembleDebug failed with exit code 1
Running flutter doctor
SDK's installed:
SDK tools:
Does anybody have any suggestions at all? I'm not sure what else to try at this point
Related
I have installed android studio properly, gave it all it needed for flutter development, java jdk version is 11, paths are properly given, the emulator runs fine but when i try to build my app on either emulator or a physical device, I get this error:
Launching lib\main.dart on V2109 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
Where:
Build file 'D:\untitled1\android\app\build.gradle' line: 26
What went wrong:
A problem occurred evaluating project ':app'.
java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to create Jar file C:\Users\ADMIN.gradle\caches\jars-9\53ad1f30a5eec66e4e9dc584d5b89b7f\fastutil-7.2.0.jar.
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 3s
Exception: Gradle task assembleDebug failed with exit code 1
Here is my flutter doctor response
Please help. Your help will be appreciated
I was expecting the project to run properly, as with the same flutter doctor response and same installation procedures on 2 different laptops I was able to run properly. I have tried reinstalling android studio thrice but of no help. tried everything I could related to java (installed different versions, updating paths).
Im trying to run my flutter application but when i run the command "flutter run" this happen:
PS C:\workspace\allgo_fim> flutter run
Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts, consider enabling software rendering with
"--enable-software-rendering".
Launching lib\main.dart on sdk gphone x86 in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file 'C:\workspace\allgo_fim\android\settings.gradle' (C:\Users\Rui\.gradle\caches\7.5\scripts\3d075fs9hjp81ny0sgym4v09w).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63
* 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
Running Gradle task 'assembleDebug'... 2 694ms
Exception: Gradle task assembleDebug failed with exit code 1
Anyone can help-me?
before when I gave "flutter run" the problem was JAVA_HOME, but I think I have solved that problem and now this happened to me.
Launching lib\main.dart on sdk gphone x86 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Failed to create Jar file C:\Users\Wrnglr.gradle\caches\jars-8\f1dd8e6ec0db9b111f425c513285a977\auto-value-annotations-1.6.2.jar.
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 2s
Exception: Gradle task assembleDebug failed with exit code 1
try the following :
1- remove .gradle file
2- stop firewall
3- run vpn like proton
4- run again
I have a problem with my Flutter app.
When I tried to start my app via an emulator, I got the following error message:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
Kotlin could not find the required JDK tools in the Java installation 'C:\Program Files\AdoptOpenJDK\jre-11.0.11.9-hotspot' used by Gradle. Make sure Gradle is running on a JDK, not JRE.
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
Exception: Gradle task assembleDebug failed with exit code 1
.
this is the standrad app which is created by flutter when creating a project and I have not changed it. When I received the message for the first time, I reinstalled gradle and java. but it didn't work. Can you help me?
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Could not create service of type DefaultUserHomeScopedCompileCaches using UserHomeScopeServices.createCompileCaches().
* 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 14s
Exception: Gradle task assembleDebug failed with exit code 1
Please tell me a solution to overcome this problem.
Run flutter clean in terminal or from android studio and try running the app again.