> Task :app:bundleReleaseJsAndAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> Process 'command 'npx.cmd'' finished with non-zero exit value 1
* 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 33s
1 actionable task: 1 executed
It seems it's a problem with your build.gradle version at root :
1-Open Android Studio
2-Open the android folder of you project
3-android studio will upgrade the gradle version automatically (make sure it does)
4-try again to generate apk
Related
I am trying to build an android apk, when I run the app or flutter build apk the following error occurs, i'm using flutter 3.0.5.
💪 Building with sound null safety 💪
FAILURE: Build failed with an exception.
* Where:
Script '/Users/edgar/Documents/tools/flutter-35/packages/flutter_tools/gradle/flutter.gradle' line: 1156
* What went wrong:
Execution failed for task ':app:compileFlutterBuildRelease'.
> Process 'command '/Users/edgar/Documents/tools/flutter-35/bin/flutter'' finished with non-zero exit value 1
* 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 45s
Running Gradle task 'assembleRelease'... 47,0s
Gradle task assembleRelease failed with exit code 1
Command: flutter run --flavor dev --no-sound-null-safety
FAILURE: Build failed with an exception.
Where:
Script '/Users/petodavid/Developer/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1156
What went wrong:
Execution failed for task ':app:compileFlutterBuildDevDebug'.
Process 'command '/Users/petodavid/Developer/flutter/bin/flutter'' finished with non-zero exit value 1
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 12s
Exception: Gradle task assembleDevDebug failed with exit code 1
I also created a github issue: https://github.com/flutter/flutter/issues/103578
Where:
Script 'D:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1156
What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
Process 'command 'D:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1
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 19s
Exception: Gradle task assembleDebug failed with exit code 1
I am trying to use my physical device for a flutter application, I am doing this through visual studio code.
flutter run --flavor=staging
OP: `FAILURE: Build failed with an exception.
Where:
Script 'C:\Users\Anand\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 991
What went wrong:
Execution failed for task ':app:compileFlutterBuildStagingDebug'.
Process 'command 'C:\Users\Anand\flutter\bin\flutter.bat'' finished with non-zero exit value 1
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 6s
Running Gradle task 'assembleStagingDebug'...
Running Gradle task 'assembleStagingDebug'... Done 134.1s
Exception: Gradle task assembleStagingDebug failed with exit code 1`
What should be done in this case?
Thanks
Whenever I run it it get stuck in android. This happened to me locally and I solve it doing flutter clean, which I don't know how to do in codemagic. The problem is that is nos building, heres the log.
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\\Users\\thech\\Downloads\\nueva_temporada-20210514T040146Z-001\\nueva_temporada\\build\\app\\intermediates\\flutter\\debug\\flutter_assets\\AssetManifest.json
* 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 30s
Running Gradle task 'assembleDebug'... 31.3s
Gradle task assembleDebug failed with exit code 1
Build failed :|
Failed to build for Android
any chance you have hardcoded path in your build.gradle or somewhere else? C:\\Users is not a valid path on Codemagic builder machines because it uses macOS or Linux