I faced with error today and I can't fix it. please help me it's drive me crazy.
Execution failed for task ':app:mergeDebugResources'.
> A failure occurred while executing
com.android.build.gradle.internal.res.ResourceCompilerRunnable
> Resource compilation failed. Check logs for details.
I've tried "clean code" and rebuild project and invalidate cache and restart. I also delete the idea.xml.but none of these didn't work
Related
During Rebuild Project following error message shown in Logcat
Task :app:dataBindingGenBaseClassesDebug FAILED
no info log is passed. There are no resources?
Execution failed for task ':app:dataBindingGenBaseClassesDebug'.
Parameter 'directory' is not a directory
Use this command
./gradlew assembleDebug --rerun-tasks
I am currently facing some issue which are related to gradle/NodeJS. What I did is used Node plugin by writing this in my gradle script:
apply plugin: 'com.moowork.node'
dependencies {
classpath 'com.moowork.gradle:gradle-node-plugin:0.12'
}
now when I try to run install npm command from terminal(CentOS) by running:
gradle npmInstall
it is running perfectly fine and installing all the required packages whereas when I run the same command from Jenkins (Jenkins installed in centos), I am getting following error msg:
:npmInstall FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':npmInstall'.
> A problem occurred starting process 'command 'npm''
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task
':npmInstall'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
Caused by: org.gradle.process.internal.ExecException: A problem occurred starting process 'command 'npm''
at org.gradle.process.internal.DefaultExecHandle.setEndStateInfo(DefaultExecHandle.java:197)
Caused by: net.rubygrapefruit.platform.NativeException: Could not start 'npm'
at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:27)
Can somebody please help me with is. I am not getting what Wrong I am doing.
I am also getting the same error msg if try to run following command:
gradle npm_run_build_prod
whereas the same list of commands are working for my local windows jenkins.
My issue was resolved on the Gradle help forum. The solution is to download Node.js during the build by adding this to build.gradle:
node {
download = true
version='9.2.0'
}
I am trying to run ./gradlew in jhipster project and getting next error with ':bower' task:
:cleanResources
:bootBuildInfo
:bower FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bower'.
> A problem occurred starting process 'command 'bower''
.......
Caused by: net.rubygrapefruit.platform.NativeException: Could not start 'bower'
at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:27)
at net.rubygrapefruit.platform.internal.WrapperProcessLauncher.start(WrapperProcessLauncher.java:36)
at org.gradle.process.internal.ExecHandleRunner.run(ExecHandleRunner.java:68)
... 2 more
Caused by: java.io.IOException: Cannot run program "bower" (in directory "/Users/vovkvlad/coding/learning/Java/jHipProj"): error=2, No such file or directory
at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
... 4 more
I have seen similar problems on stackoverflow:
Running JHipster Gradle task from Intellij IDEA
jhipster - error executing task :bower
But first link complains only about failure in IntelliJ (and in my case the same error occurs in the terminal)
And second link gives pretty strange answer with removing node which seems strange to me, and may be not applicable since 2 years have past.
So, do anyone have a key to what am I doing wrong?
I will be grateful for any kind of help/hint.
Thanks in advance for help!
EDIT: I have bower installed globally, so that it can be found under one of the paths in $PATH. And bower is recognized from the terminal.
I was having this same issue. I was able to fix it by stopping the gradle daemon using ./gradlew --stop. Here is a link to a post where I found the solution.
i got the same issue, and fixed it with command below.
gradle --stop
In my case, i use Eclipse with Buildship plugin, it starts a Grade Daemon to build project by itself, and the classpath of NodeJS & Bower is difference when running application in terminal.
I just updated Android Studio (0.8.14) and got bombarded with various errors.
When I try to clean my project, I get this:
Error:Execution failed for task ':app:clean'.
> Unable to delete directory: C:\Users\----\Documents\Android Projects\----\app\build\intermediates
Every class that imports com.myorg.myproject.R says:
Cannot resolve symbol 'R'.
I checked my androidmanifest and it's referencing the package correctly. Any idea how to fix this?
gradlew clean in the terminal works without error, but the clean function from the Build menu throws this error.
C:\Users\----\Documents\Android Projects\---->gradlew clean
:app:clean
BUILD SUCCESSFUL
Total time: 5.43 secs
Thanks
I get this error code when I generate a key when I try make a APK.... it debugs without error but shows this when I try to publish the APK .... Driving me isane...ANY IDEAS would be great! Thank in advance.
Please show in Hirachy where I need to fix please I new with Studio!
Error:Execution failed for task ':app:preDexRelease'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
C:\Program Files\Android\android-studio\sdk\build-tools\21.0.2\dx.bat --dex --output C:\Users\dunn\AndroidstudioProjects\TheCityScenes\app\build\intermediates\pre-dexed\release\GoogleAdMobAdsSdk-4.1.0-b731e64f1aad819519b8bd32bacb9d953860eaf5.jar C:\Users\dunn\AndroidstudioProjects\TheCityScenes\app\libs\GoogleAdMobAdsSdk-4.1.0.jar
Error Code:
1
This is probably due to low RAM memory when building the apk. Please check your amount of memory, clear it up and try again.