I cloned an existing app from GitHub but the build is not working for that. The path in which error is showing is of windows operating system whereas i am working on a Mac OS. Tried Flutter clean, Pub outdated, Pub Upgrade, deleted build folder but still none of them works.
Launching lib/main.dart on sdk gphone64 x86 64 in debug mode...
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:
D:\ISKCON\volApp\volstoryFlutter\android\app\build\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 3s
Related
After I copy my project to a new laptop, I tried to run a flutter project in vscode. however during debugging gradle failed to build and gave me this in the debug console
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
lib\main.dart:1
FAILURE: Build failed with an exception.
What went wrong:
Could not open settings generic class cache for settings file 'D:\PROJECT_NAME\android\settings.gradle' (C:\Users\Folder.gradle\caches\7.4\scripts\ea4ydi90mwjg9g63m7r6nimmx).
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
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
I have no idea what went wrong since the JDK is the same version (19) as my old laptop
edit: I tried to download a new gradle, and create a new empty project, and I still get the same error
Running a flutter project on the new laptop
i download flutter yesterday and make a project by flutter create command
i had problem in the build and run at first but i follow the instructions of https://docs.flutter.dev/deployment/android
then i build the app and try it in my phone and it work
but when i try to run the app in my phone by usb or in the emulator the same error happend
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:validateSigningDebug'.
java.util.concurrent.ExecutionException: com.android.builder.utils.SynchronizedFile$ActionExecutionException: java.io.IOException: com.android.ide.common.signing.KeytoolException: Failed to create keystore.
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 6s
Exception: Gradle task assembleDebug failed with exit code 1
i tried the solve of the website above
My flutter project output runs on chrome web and windows desktop but when I try it for mobile emulator (AVD) I encounter this Error :
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
lib\main.dart:1
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all files for configuration ':classpath'.
Could not find com.android.tools.build:gradle:7.1.2.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.1.2/gradle-7.1.2.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.1.2/gradle-7.1.2.pom
Required by:
project :
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 44s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
FAILURE: Build failed with an exception.
What went wrong:
Gradle could not start your build.
Could not create service of type FileAccessTimeJournal using GradleUserHomeScopeServices.createFileAccessTimeJournal().
java.io.FileNotFoundException: C:\Users\DELL.gradle\caches\journal-1\journal-1.lock (Access is denied)
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 23s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Running Gradle task 'assembleDebug'...
Had the same problem, these actions worked for me: Close IDE. Go to windows task manager -> processes. Find java.exe processes there and end them.
Or try to these commands:
./gradlew --stop
OR
gradle --stop
Credits
Launching lib\main.dart on Android SDK built for x86 in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all artifacts for configuration ':classpath'.
Could not download kotlin-compiler-embeddable.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50)
Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3.50/kotlin-compiler-embeddable-1.3.50.jar'.
Connection reset
* 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 44m 49s
Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
you may have net problem. Check connection and try again. This may solve your problem