Android Studio gradle failure on debug - java

Gradle:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':name:compileDebug'.
Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Try to run "gradlew compileDebug" from the command line to fix this problems. See this answer for more information.
Also make sure to update your gradle plugin to the latest version. (0.4.3 since yesterday)
Use com.android.tools.build:gradle:0.4.+ in your gradle.build file and you'll always get the latest gradle android plugin.

Related

I'm trying to build a Nativescript (angular) app and ran tns run android but unfortunately, I keep getting this build error

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

Ionic Builed Project Failed : Could not determine the dependencies of task ':app:lintVitalRelease'

I'm new with ionic frameworks. i'm try to to build android with command sudo build --release android and get error as below
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalRelease'.
> 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.appcompat:appcompat:1.0.0, 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:drawerlayout: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.0.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.lifecycle: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.vectordrawable:vectordrawable-animated:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.vectordrawable:vectordrawable: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 16s
Command failed with exit code 1: /Users/Muhamadkhairuldin/Google Drive/SifuApps/Apps/usahaone5/platforms/android/gradlew cdvBuildRelease -b /Users/Muhamadkhairuldin/Google Drive/SifuApps/Apps/usahaone5/platforms/android/build.gradle
[ERROR] An error occurred while running subprocess cordova.
cordova build android --release exited with exit code 1.
can anybody help me how to solve this?

Executing external libraries for cmake(Android Studio)

I am trying to build a project but its gradle is not working properly. First it was giving me error that NDK should be there so i download ndk from sdk manager but still it is giving me error and i m not able to find how can i resolve it?
Please look at my error and tell me what should i do for gradle build?
executing external native build for cmake C:\Users\Geet\Downloads\woocommercesourcecode\codecanyon-25092266-woobox-native-android-app-for-woocommerce\MainFile_Android_SourceCode\Android App source code\woobox_droid\app\CMakeLists.txt
FAILURE: Build failed with an exception.
What went wrong:
executing external native build for cmake C:\Users\Geet\Downloads\woocommercesourcecode\codecanyon-25092266-woobox-native-android-app-for-woocommerce\MainFile_Android_SourceCode\Android App source code\woobox_droid\app\CMakeLists.txt
Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Exception is:
com.intellij.openapi.externalSystem.model.ExternalSystemException: executing external native build for cmake C:\Users\Geet\Downloads\woocommercesourcecode\codecanyon-25092266-woobox-native-android-app-for-woocommerce\MainFile_Android_SourceCode\Android App source code\woobox_droid\app\CMakeLists.txt

Fail to run desktop app with desktop:run LIBGDX

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

gradle - classnotfoundexception - ToolResolver

I've recently updated the gradle version in a project to 2.13. Since doing so attempts to run any builds, tests, whatnot give me this error:
FAILURE: Build failed with an exception.
* What went wrong:
org/gradle/platform/base/internal/toolchain/ToolResolver
> org.gradle.platform.base.internal.toolchain.ToolResolver
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
java.lang.NoClassDefFoundError: org/gradle/platform/base/internal/toolchain/ToolResolver
The only gradle reference to ToolResolver appears to be in the Java plugin. Is it possible that the plugin is corrupted somehow?
Suggestions on how to fix this?
Try to upgrade Gradle to the latest version

Categories