Gradle build error in AndroidStudio 3.0 Canary 1 - android

I was trying to make new project in AndroidStudio 3.0 Canary 1. But the project was not building successfully due to following errors.
Error:com.android.ide.common.process.ProcessException: Error while executing process C:\Users\Arun\AppData\Local\Android\Sdk\build-tools\25.0.3\aapt2.exe with arguments {link -I C:\Users\Arun\AppData\Local\Android\Sdk\platforms\android-25\android.jar --manifest F:\Workspace\InstaApp\base\build\intermediates\manifest\androidTest\debug\AndroidManifest.xml -R #F:\Workspace\InstaApp\base\build\intermediates\incremental\processDebugAndroidTestResources\aapt-temp\aapt-resources-list.txt --auto-add-overlay --java F:\Workspace\InstaApp\base\build\generated\source\r\androidTest\debug -o F:\Workspace\InstaApp\base\build\intermediates\res\androidTest\debug\resources-debugAndroidTest.ap_ -0 apk --output-text-symbols F:\Workspace\InstaApp\base\build\intermediates\symbols\androidTest\debug\R.txt --no-version-vectors}
Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing process C:\Users\Arun\AppData\Local\Android\Sdk\build-tools\25.0.3\aapt2.exe with arguments {link -I C:\Users\Arun\AppData\Local\Android\Sdk\platforms\android-25\android.jar --manifest F:\Workspace\InstaApp\base\build\intermediates\manifest\androidTest\debug\AndroidManifest.xml -R #F:\Workspace\InstaApp\base\build\intermediates\incremental\processDebugAndroidTestResources\aapt-temp\aapt-resources-list.txt --auto-add-overlay --java F:\Workspace\InstaApp\base\build\generated\source\r\androidTest\debug -o F:\Workspace\InstaApp\base\build\intermediates\res\androidTest\debug\resources-debugAndroidTest.ap_ -0 apk --output-text-symbols F:\Workspace\InstaApp\base\build\intermediates\symbols\androidTest\debug\R.txt --no-version-vectors}
Error:org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Arun\AppData\Local\Android\Sdk\build-tools\25.0.3\aapt2.exe'' finished with non-zero exit value 1
Help me for this error. Thanks in advance ; )

The problem can be in buildToolsVersion. Try to change it to 26.0.0-rc2.
I had the same error when trying to add custom font as font-file in resources (this is a new feature of Android O), but this feature works only on 26+.

Related

getting issue while building android os pie

I have done make clean and after that make -j7 but got this build issue. Please help
[61/62] glob vendor/mediatek/proprietary_mt8168/frameworks/ml/nn/tflite/tensorflow/contrib/lite/tflite_static.bp
[113/113] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -l out/.module_paths/Android.bp.list -b out/soong -n out -d out/soong/build.ninja.d -o out/soong/build.ninja Android.bp
error: external/doclava/bin/Android.bp:15:1: module "droiddoc-templates-sdk" already defined
external/doclava/Android.bp:15:1 <-- previous definition here
error: external/doclava/bin/Android.bp:20:1: module "doclava" already defined
external/doclava/Android.bp:20:1 <-- previous definition here
ninja: build stopped: subcommand failed.
21:42:48 soong bootstrap failed with: exit status 1```
delete this folder:
external/doclava/bin
and re-run the build

Android Error building Player: CommandInvokationFailure: Failed to re-package resources

I am getting this error when i try to build my game for android.
What I've tried
I have looked at all the other answers on Stack Overflow but nothing seems to work
I have deleted the 24.0.0 Build tools
I have tried different jdk
I always get the same error trying to build for android.
I am using Unity 5.3.8 and Mac Yosemite
Error details
CommandInvokationFailure: Failed to re-package resources. See the
Console for
details./Users/admin/Library/Android/sdk/build-tools/android-4.4W/aapt
package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S
"res" -I
"/Users/admin/Library/Android/sdk/platforms/android-26/android.jar" -F
bin/resources.ap_ --extra-packages
com.google.unity:android.support.v7.appcompat:com.facebook.android:com.google.android.gms:com.google.android.gms.ads.impl:com.google.android.gms.ads:com.google.android.gms.base:com.google.android.gms:com.google.android.gms.clearcut:com.google.android.gms.gass:com.google.android.gms.tasks:android.support.v4
-S "/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/appcompat-v7-23.1.1/res"
-S "/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/facebook/res"
-S "/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/google-play-services_lib/res"
-S "/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/play-services-ads-10.0.1/res"
-S "/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/play-services-ads-lite-10.0.1/res"
-S "/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/play-services-base-10.0.1/res"
-S "/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/play-services-basement-10.0.1/res"
-S "/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/play-services-clearcut-10.0.1/res"
-S "/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/play-services-gass-10.0.1/res"
-S "/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/play-services-tasks-10.0.1/res"
-S "/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/support-v4-24.0.0/res"stderr[/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/google-play-services_lib/res/values/admob_ads_attrs.xml:10: error: Attribute "adSize" has already been
defined/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/google-play-services_lib/res/values/admob_ads_attrs.xml:17: error: Attribute "adSizes" has already been
defined/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/google-play-services_lib/res/values/admob_ads_attrs.xml:20: error: Attribute "adUnitId" has already been
defined/Users/admin/Desktop/game/Temp/StagingArea/android-libraries/appcompat-v7-23.1.1/res/values/values.xml:110:
error: Attribute "theme" has already been
defined]stdout[Configurations

GradleProcessResult.buildProcessException(GradleProcessResult.java:74)

I am in a class for mobile programming and working with Android Studio. For the final project I am making a text "chose your adventure" game. Everything was working until I added a second activity. Then MainActivity.java developed shows an R. cannot be resolved. Questions about this error have been covered several times in these forums and I have tried the solutions given to no avail. I then started going through the stack trace and trying solutions that were given. Also with no success. The last I looked up was this - "at com.android.build.gradle.internal.process.GradleProcessResult.buildProcessException(GradleProcessResult.java:74)". It was recently asked, but with no answer. I was glad to see that is was a recent problem and that I was not the only one having it. The asker of the question was trying to accomplish something different than I was and was getting a different stack trace so I am hoping that someone will know what I am doing wrong. I do not wish any help in creating my app., just in figuring out why I can not get gradle to play nice with me. Any help would be greatly appreciated.ty
I have updated gradle, studio and android gradle plugin.
log
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:865)
... 86 more
Caused by: com.android.ide.common.process.ProcessException: Error while executing process C:\Users\Admin\AppData\Local\Android\Sdk\build-tools\25.0.2\aapt.exe with arguments {package -f --no-crunch -I C:\Users\Admin\AppData\Local\Android\Sdk\platforms\android-25\android.jar -M \?\C:\Users\Admin\AndroidStudioProjects\Gargoyle\app\build\intermediates\manifests\full\release\AndroidManifest.xml -S C:\Users\Admin\AndroidStudioProjects\Gargoyle\app\build\intermediates\res\merged\release -m -J \?\C:\Users\Admin\AndroidStudioProjects\Gargoyle\app\build\generated\source\r\release -F C:\Users\Admin\AndroidStudioProjects\Gargoyle\app\build\intermediates\res\resources-release.ap_ --custom-package org.naturalattitude.gargoyle -0 apk --output-text-symbols \?\C:\Users\Admin\AndroidStudioProjects\Gargoyle\app\build\intermediates\symbols\release --no-version-vectors}
at com.android.build.gradle.internal.process.GradleProcessResult.buildProcessException(GradleProcessResult.java:74)
at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:49)
at com.android.builder.internal.aapt.AbstractProcessExecutionAapt$1.onSuccess(AbstractProcessExecutionAapt.java:78)
at com.android.builder.internal.aapt.AbstractProcessExecutionAapt$1.onSuccess(AbstractProcessExecutionAapt.java:74)
at com.google.common.util.concurrent.Futures$6.run(Futures.java:1319)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457)
at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145)
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:185)
at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53)
at com.android.build.gradle.internal.process.GradleProcessExecutor$1.run(GradleProcessExecutor.java:60)
Caused by: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Admin\AppData\Local\Android\Sdk\build-tools\25.0.2\aapt.exe'' finished with non-zero exit value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:369)
at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:47)
... 9 more
Message Gradle Build
Information:Gradle tasks [clean, :app:generateReleaseSources, :app:prepareReleaseUnitTestDependencies, :app:mockableAndroidJar, :app:compileReleaseSources, :app:compileReleaseUnitTestSources]
Error:String types not allowed (at 'fullBackupContent' with value 'Gargoyle').
Error:String types not allowed (at 'fullBackupContent' with value 'Gargoyle').
Error:Execution failed for task ':app:processReleaseResources'.
com.android.ide.common.process.ProcessException: Failed to execute aapt
Information:BUILD FAILED
Information:Total time: 13.485 secs
Information:3 errors
Information:0 warnings
Information:See complete output in console
Gradle Console
at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:116)
at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:865)
... 86 more
Caused by: com.android.ide.common.process.ProcessException: Error while executing process C:\Users\Admin\AppData\Local\Android\Sdk\build-tools\25.0.2\aapt.exe with arguments {package -f --no-crunch -I C:\Users\Admin\AppData\Local\Android\Sdk\platforms\android-25\android.jar -M \?\C:\Users\Admin\AndroidStudioProjects\Gargoyle\app\build\intermediates\manifests\full\release\AndroidManifest.xml -S C:\Users\Admin\AndroidStudioProjects\Gargoyle\app\build\intermediates\res\merged\release -m -J \?\C:\Users\Admin\AndroidStudioProjects\Gargoyle\app\build\generated\source\r\release -F C:\Users\Admin\AndroidStudioProjects\Gargoyle\app\build\intermediates\res\resources-release.ap_ --custom-package org.naturalattitude.gargoyle -0 apk --output-text-symbols \?\C:\Users\Admin\AndroidStudioProjects\Gargoyle\app\build\intermediates\symbols\release --no-version-vectors}
at com.android.build.gradle.internal.process.GradleProcessResult.buildProcessException(GradleProcessResult.java:74)
at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:49)
at com.android.builder.internal.aapt.AbstractProcessExecutionAapt$1.onSuccess(AbstractProcessExecutionAapt.java:78)
at com.android.builder.internal.aapt.AbstractProcessExecutionAapt$1.onSuccess(AbstractProcessExecutionAapt.java:74)
at com.google.common.util.concurrent.Futures$6.run(Futures.java:1319)
at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:457)
at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:156)
at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:145)
at com.google.common.util.concurrent.AbstractFuture.set(AbstractFuture.java:185)
at com.google.common.util.concurrent.SettableFuture.set(SettableFuture.java:53)
at com.android.build.gradle.internal.process.GradleProcessExecutor$1.run(GradleProcessExecutor.java:60)
Caused by: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Admin\AppData\Local\Android\Sdk\build-tools\25.0.2\aapt.exe'' finished with non-zero exit value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:369)
at com.android.build.gradle.internal.process.GradleProcessResult.assertNormalExitValue(GradleProcessResult.java:47)
... 9 more
Sorry for the reports in the question.
Everything was working until I added a second activity. Then MainActivity.java developed shows an R. cannot be resolved.
I think this is the important symptom and any complaints from gradle or other build components are just cascading errors.
The R. namespace contains the visual resources, and when it is not available it means that something failed during compilation of the resouces (like a syntax error or missing end tag in the axml files). You need to figure out why resource compilation fails.
So you said adding a second activity triggered this. The first step should then be to back up to the state before adding this and verify that things work fine. Then you gradually add what you had in small steps to see where it breaks (e.g. add the new activity but comment out all its content. Then uncomment part by part).
If you have committed changes in smaller steps like you should (you DO use a source control system, right?), this should be relatively easily and if you are using git you can use the git bisect command.

Gradle Multi String Value files

from this link i had use multi language support in my Android Project, Yesterday i decided to switch to Intellij Idea gradle, when i remove value files in different language, app run normally with default language
but with multi string value file get this error
Error:Gradle: Execution failed for task ':...:processDebugResources'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/home/.../sdk/build-tools/android-4.4.2/aapt package -f --no-crunch -I
/home/.../sdk/platforms/android-19/android.jar -M
/home/.../.../build/manifests/debug/AndroidManifest.xml -S
/home/.../.../build/res/all/debug -A
/home/.../.../build/assets/debug -m -J /home/.../.../build/source/r/debug -F
/home/.../.../build/libs/...-debug.ap_ --debug-mode --custom-package ... --output-text-symbols /home/.../build/symbols/debug
Error Code:
1
Output:
/home/.../build/res/all/debug/values-Ar/values.xml: error: Duplicate file.
/home/.../build/res/all/debug/values/values.xml: Original is here.
Your problem seems to be with naming conventions.
The main problem with the structure you're using is that you used a capital letter.
In android file structure in res folder should always be in lowercase.
instead of
values-Ar
you should use
values-ar
for your values folder if you want an arabic locale to find your strings,values ...

Android Manifest file error after adding AdMob

I have gone through the below link for integrating AdMob
http://fastegggames.com/blog/2013/3/30/tutorial-admob
and Follwing is the error when i tried to build my .apk to test AdMob :
Error building Player: CommandInvokationFailure: Failed to re-package resources. See the Console for details.
C:\android-sdk-windows1\build-tools\19.0.1\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "C:/android-sdk-windows1/platforms/android-19\android.jar" -F bin/resources.ap_ --extra-packages -S "C:\Users\avisingh.TAGS\Desktop\ONE_07\ONE_07\Temp\StagingArea\android-libraries\facebook\res"
stderr[
C:\Users\avisingh.TAGS\Desktop\ONE_07\ONE_07\Temp\StagingArea\android-libraries\facebook\res\values\strings.xml: error: Duplicate file.
res\values\strings.xml: Original is here.
]
stdout[
Processing raw dir 'C:\Users\avisingh.TAGS\Desktop\ONE_07\ONE_07\Temp\StagingArea\android-libraries\facebook\res'
]
I tried to build in API18 and API19 but still the same error. Can any one please help me through

Categories

Resources