Maximo Anywhere WorkManager build failed - android

I am try to build android apps but while creating apps my build failed with following errors.
D:\ibm\AnywhereWorkManager\build.xml:87: The following error occurred
while executing this line:
D:\ibm\AnywhereWorkManager\anywhere-apps-builder.xml:720: The
following error occurred while executing this line:
D:\ibm\AnywhereWorkManager\anywhere-apps-builder.xml:716: Failed
building application:
com.worklight.builder.exception.WorklightBuildException:
java.io.IOException: Unable to delete directory
D:\ibm\AnywhereWorkManager\apps\WorkApproval\android\native\assets\www\default\dojo\cldr\nls\zh-hans-mo.
at
org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)

I know this answer might seem obvious, but if you have any of the files mentioned in the failure (D:\ibm\AnywhereWorkManager\apps\WorkApproval\android\native\assets\www\default\dojo\cldr\nls\zh-hans-mo)
open ( commandline, eclipse, other editor), this will cause the issue.

Related

Execution failed for task ':stripe_stripe-react-native:compileDebugKotlin'. after updating #stripe/stripe-react-native to 0.21.0

Im getting the following error after running yarn run android:
* What went wrong:
Execution failed for task ':stripe_stripe-react-native:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error. See log for more details
i had to update #stripe/stripe-react-native because mi app was getting an error in the new xcode 14, my app is running well in ios, but in android im getting this error, please i need help...
i tried workarounds but didnt work

Jenkins - Execution failed for task ':app:mergeDebugResources'

I am trying to work with Jenkins however I cannot build the apk with it as I am having issue with AAPT2 and Gradle.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Multiple task action failures occurred:
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
> Android resource compilation failed
ERROR:C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-3\b478eb984dbbd1317dab9bfd9689b3aa\transformed\appcompat-1.3.0\res\drawable-hdpi-v4\abc_list_divider_mtrl_alpha.9.png: AAPT: error: file not found.
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
> Android resource compilation failed
ERROR:C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-3\b478eb984dbbd1317dab9bfd9689b3aa\transformed\appcompat-1.3.0\res\drawable-xhdpi-v4\abc_list_divider_mtrl_alpha.9.png: AAPT: error: file not found.
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
> Android resource compilation failed
ERROR:C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-3\b478eb984dbbd1317dab9bfd9689b3aa\transformed\appcompat-1.3.0\res\drawable-mdpi-v4\abc_list_divider_mtrl_alpha.9.png: AAPT: error: file not found.
I already read tons of SO question that may share same issue to my case saying that it has something to do with the file path being too long but I still cannot find any solution.
UPDATE
I tried to change Android Studio Gradle home similar to what Jenkins is using and received similar error which indicates that it may really have something to do with long file path.
I think the final question will be how to change Jenkins Gradle Home?
You need to replace \ with \\ if you are giving path with jenkins in Windows.
May be if file path is too huge or that is the root cause you can try mounting the directory to a short path
EDIT : Based on your modified question :
Open Jenkins dashboard. Navigate to Manage Jenkins-> Configure System. Under the Global properties section add another environment variable named GRADLE_USER_HOME as shown below.
I ran into this exact issue, but unfortunately changing the GRADLE_USER_HOME environment variable did not help, as aapt2 appeared to ignore the change and still used Windows/system32/... for the cache location.
The problem was how I was running Jenkins as a service. In the service.msc settings, it was set to Log On as a Local System account, which set the USER_HOME variables to C:\Windows\System32. Because of this, the reason the error said that the file did not exist was because Jenkins/gradle did not have access to the System32 folder.
My fix was to change the log on method to 'This account', then enter a user account so Jenkins wasn't logged on as system anymore.

Gradle error trying to run nativescript app on android emulator on mac

I'm trying to run a nativescript app on android using tns run android
I'm always getting gradle error:
FAILURE: Build failed with an exception.
* Where:
Build file:
'/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/bui
ld.gradle' line: 28
* What went wrong:
A problem occurred evaluating root project '`kinvey_nativescript_sdk`'.
> Failed to apply plugin [class 'org.gradle.api.plugins.BasePlugin']
> Could not create service of type OutputFilesRepository using ExecutionServices.createOutputFilesRepository().`
I tried the following:
Run ./gradlew --stacktrace but I got this error:
Caused by: org.gradle.cache.LockTimeoutException: Timeout waiting to lock
execution history cache
(/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/.gr
adle/5.1.1/executionHistory). It is currently in use by another Gradle
instance.
Owner PID: unknown
Our PID: 50331
Owner Operation: unknown
Our operation:
Lock file:
/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/.gra
dle/5.1.1/executionHistory/executionHistory.lock
Deleted .lock files manually and re-ran tns run android but I got the same error again
Run
chmod R+x/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk
Didn't fix the problem
The app runs fine on ios emulator and but not on android
I was having the same problem, looks to be related with this Gradle issue.
The workaround I found here is to move the project to the home folder (~).

New Relic - java.io.IOException: File exists

I experience problems when trying to build my Android project which depends on New Relic. See grade command and stack trace below.
Command:
./gradlew clean assembleProdDebug assembleProdDebugTest
See terminal output below:
...
:my-project:my-project:packageReleaseJniLibs[newrelic] Error encountered while loading the New Relic agent
java.io.IOException: File exists
at sun.tools.attach.BsdVirtualMachine.createAttachFile(Native Method)
at sun.tools.attach.BsdVirtualMachine.<init>(BsdVirtualMachine.java:74)
at sun.tools.attach.BsdAttachProvider.attachVirtualMachine(BsdAttachProvider.java:63)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
at com.sun.tools.attach.VirtualMachine$attach.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at com.newrelic.agent.android.NewRelicTask.injectAgent(NewRelicTask.groovy:45)
at com.newrelic.agent.android.NewRelicTask$injectAgent$0.callCurrent(Unknown Source)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':my-project:newRelicInstrumentTask'.
> java.io.IOException: File exists
It complains about "File exists" but it doesn't say anything about what file or where or how to solve it.
Top level build.gradle file has the following dependency:
classpath "com.newrelic.agent.android:agent-gradle-plugin:4.+"
and each of the two apps has the following:
compile 'com.newrelic.agent.android:android-agent:4.273.4'
New Relic and the build process worked perfectly fine until I merged two apps into the same Android studio project. I did this because the two apps share a lot of code with each other.
Anyone experienced the same problem? Any ideas on how to solve it? Just ask if you need more information.

error in NetBeans for android setContentView

I have the following errors after installing android sdk, and android plugin for NetBeans:
c:/Android/android-sdk/tools/ant/build.xml:892:The following error occurred while executing this line:
c:/Android/android-sdk/tools/ant/build.xml:894: The following error occurred while executing this line:
c:/Android/android-sdk/tools/ant/build.xml:906: The following error occurred while executing this line:
c:/Android/android-sdk/tools/ant/build.xml:284: null return: 2
My guess is that the environment is not properly configured to run the build. You can look into c:/Android/android-sdk/tools/ant/build.xml:284 to see what is executed there. You may need to tell Ant where is Java installed or something similar.

Categories

Resources