Android Studio Android Wear error - android

hello im try to make a app for android wear i get this error
Error:Execution failed for task ':pokemondamagecalulatorwear:mergeDebugResources'.
Error: com.android.builder.internal.aapt.AaptException: Failed to crunch file C:\Users\danie\AndroidStudioProjects\PokemonDamageCalculator\pokemondamagecalulatorwear\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\10.0.1\res\drawable-xhdpi-v4\common_google_signin_btn_text_light_disabled.9.png into C:\Users\danie\AndroidStudioProjects\PokemonDamageCalculator\pokemondamagecalulatorwear\build\intermediates\res\merged\debug\drawable-xhdpi-v4\common_google_signin_btn_text_light_disabled.9.png
Error:com.android.builder.internal.aapt.AaptException: Failed to crunch file C:\Users\danie\AndroidStudioProjects\PokemonDamageCalculator\pokemondamagecalulatorwear\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\10.0.1\res\drawable-xhdpi-v4\common_google_signin_btn_text_light_disabled.9.png into C:\Users\danie\AndroidStudioProjects\PokemonDamageCalculator\pokemondamagecalulatorwear\build\intermediates\res\merged\debug\drawable-xhdpi-v4\common_google_signin_btn_text_light_disabled.9.png

This is nothing to do with Android Wear per se. It's apparently a file path length limitation: see https://stackoverflow.com/a/39621978/252080

Related

I'm getting this error while tryng to build the aab files for my android application: I receive the next message: failed processing manifest

I'm currently finishing the build of my app but I got an error where the mesagge says failed processing manifest, searching for more, I found the next error messages:
Android resource linking failed
C:\AndroidStudioProjects\LogisticaAB\app\build\intermediates\bundle_manifest\release\AndroidManifest.xml:18: error: resource mipmap/ic_launcher_ab (aka com.altba.logisticaab:mipmap/ic_launcher_ab) not found.
C:\AndroidStudioProjects\LogisticaAB\app\build\intermediates\bundle_manifest\release\AndroidManifest.xml:18: error: resource mipmap/ic_launcher_ab_round (aka com.altba.logisticaab:mipmap/ic_launcher_ab_round) not found.
error: failed processing manifest.
But the archives for the icons are in their place, and while testing the app it works well. What can I do to resolve this?

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.

unable to make signed apk in android using android studio ,getting error:

Error:Execution failed for task ':app:packageRelease'.
java.io.IOException: Failed to read zip file 'E:\Ondoor Final Repository created on 08-02-2016\Project\projectname\app\build\intermediates\transforms\proguard\release\jars\3\1f\main.jar'.
can anybody help me :

Maximo Anywhere WorkManager build failed

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.

Robotium + Android studio

When I run robotium (5.2.1) tests from android studio 1.0 RC 2, I get this following error ==>
:app:shrinkDebugTestMultiDexComponents FAILED
Error:Execution failed for task ':app:shrinkDebugTestMultiDexComponents'.> java.io.IOException: The output jar is empty. Did you specify the proper '-keep' options?
I have no problem to run the application "in normal mode".
Do you know where is my problem ?
Thx in advance
EDIT
According to Jared Burrows's answer I can pass task shrinkDebugTestMultiDexComponents but now I have this problem
:app:packageAllDebugTestClassesForMultiDex FAILED
Error:Execution failed for task ':app:packageAllDebugTestClassesForMultiDex'.> java.util.zip.ZipException: duplicate entry: android/support/multidex/BuildConfig.class

Categories

Resources