I'm using VS code without Android studio in Ubuntu 20.04. While running the first app in flutter in debugging mode in an real device produced this error given below. I also tried to change my JDK version but it didn't worked.
Launching lib/main.dart on Nokia 6 1 Plus in debug mode...
FAILURE: Build failed with an exception.
* What went wrong:
Could not initialize class org.codehaus.groovy.runtime.InvokerHelper
* 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
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 18.3s
Exception: Gradle task assembleDebug failed with exit code 1
Please suggest a solution!
Your gradle sync has failed for some reason.
Do this
File > Open
Navigate to your project
You will see an android folder there open that as project in a new window
Check the gradle sync issues and resolve those
Related
Full error:
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\romario\git\trials\meo\platforms\tempPlugin\core\build.gradle' line: 6
What went wrong:
A problem occurred evaluating root project 'core'.
Failed to apply plugin 'com.android.internal.library'.
Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.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
Failed to build plugin #nativescript/core :
Error: Command gradlew.bat failed with exit code 1
notes
I am running java 11
After the update of my Flutter project to JAVA 11 suddenly I got this error when I try to run the app on any device.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileQa4DebugJavaWithJavac'.
> Could not resolve all files for configuration ':app:androidJdkImage'.
> Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JdkImageTransform: /Users/enzoftware/Library/Android/sdk/platforms/android-30/core-for-system-modules.jar.
> jlink executable /Applications/Android Studio Preview.app/Contents/jre/jdk/Contents/Home/bin/jlink does not exist.
* 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 56s
Exception: Gradle task assembleQa4Debug failed with exit code 1
I tried doing flutter clean, install again the SDK for API 30 and reinstalling everything from scratch but the problem persist.
Any suggestions are welcome.
Change version of JAVA 8 because JAVA 11 isn't good for using Flutter. I was on sam
I'm building my first cordova app and I'm trying to install it on my Android phone to check if everything is working.
But I keep getting the same error message over and over again:
C:\LesCordova\project_cordova>cordova build android
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=C:\Android-SDK (recommended setting)
ANDROID_HOME=undefined (DEPRECATED)
Using Android SDK: C:\Android-SDK
Subproject Path: CordovaLib
Subproject Path: app
Task :app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeDebugResources'.
This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.
The following AndroidX dependencies are detected: androidx.versionedparcelable:versionedparcelable:1.0.0, androidx.fragment:fragment:1.0.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.core
:core:1.0.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerla
yout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core
:core-common:2.0.0, androidx.annotation:annotation:1.1.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.lif
ecycle:lifecycle-livedata-core:2.0.0, androidx.arch.core:core-runtime:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.
0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.print:print:1.0.0
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
7 actionable tasks: 1 executed, 6 up-to-date
Command failed with exit code 1: C:\LesCordova\project_cordova\platforms\android\gradlew cdvBuildDebug -b C:\LesCordova\project_cordova\platforms\android\build.gradle
I already tried to change the android.useAndroidX property to true, but it changes back to false.
I already deleted the platform/android directory.
I realy hope someone knows what I'm doing wrong, because I'm running out of time...
Thank you!
Greetings Joyce
When I am making apk file from my android for the first time.
I have this error.Can anyone help me?
**Execution failed for task ':app:mergeDebugResources'.
Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
Could not resolve com.android.tools.build:aapt2:3.6.2-6040484.
Required by:
project :app
No cached version of com.android.tools.build:aapt2:3.6.2-6040484 available for offline mode.
No cached version of com.android.tools.build:aapt2:3.6.2-6040484 available for offline mode.
* 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
5 actionable tasks: 5 executed**
This error usually occurs due to the Gradle running in offline mode:-
Disable the offline mode of Gradle by going to File - Project Settings - Build, Execution, Deployment - Gradle - Remove --offline in Command Line options.(Or, simply click the -//- icon in the Gradle window.)
Then, connect to the internet and run Gradle build.
After the build has run once, you can enable the offline mode again.
I am using android studio idea for my libgdx project. I configured custom desktop configuration setting
Tasks: desktop:run
Gradle Project: mygame
Running android works fine but running this configuration brings the following error
9:08:42 PM: Executing task 'desktop:run'...
Executing tasks: [desktop:run]
Configuration on demand is an incubating feature. WARNING:
Configuration 'compile' is obsolete and has been replaced with
'implementation'. It will be removed at the end of 2018 Gradle now
uses separate output directories for each JVM language, but this build
assumes a single directory for all classes from a source set. This
behaviour has been deprecated and is scheduled to be removed in Gradle
5.0 at build_4irp102idy0ifcnkhwn53osnp$_run_closure3.doCall(D:\LibgdxProjects\Tembo\desktop\build.gradle:22)
(Run with --stacktrace to get the full stack trace of this
deprecation warning.)
FAILURE: Build failed with an exception.
What went wrong: java.lang.NullPointerException (no error message)
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 9:08:45 PM: Task execution finished 'desktop:run'.
Important details
Gradle version: 4.4
How can i fix this. I tried downgrading my gradle version but the minimim supported is 4.4
NOTE: running gradlew desktop:run on project root works.
currently this version of gradle is not supported you can use version 2.3.3
There is an activity to upgrade to Gradle 4.6 which you can follow up here
https://github.com/libgdx/libgdx/issues/5177