While trying to use aapt2 to link some resources, I got this error message error: resource drawable/googleg_standard_color_18 (aka com.google.android.gms.auth.api:drawable/googleg_standard_color_18) not found. and other similar messages about some files not found.
Where can I find these resource files that aapt2 needs?
The error about the resource not found in your project which you are trying to use.
put the needed icon or resource in your drawable folder and try to use it.
Related
So i added a library (.aar file) to android /libs folder but after building it get the following error:
Android resource linking failed
ERROR:/Users/user/.gradle/caches/transforms-3/10ca9a741af4216236836ada19bf8fab/transformed/jetified-higosdk-0.0.12/res/values/values.xml: AAPT: error: style attribute 'attr/errorTextColor (aka package.name.mobile.test:attr/errorTextColor)' not found.
ERROR:/Users/user/.gradle/caches/transforms-3/10ca9a741af4216236836ada19bf8fab/transformed/jetified-higosdk-0.0.12/res/values/values.xml: AAPT: error: style attribute 'attr/hintTextColor (aka package.name.mobile.test:attr/hintTextColor)' not found.
I downloaded this library from nexus repository manager and there is also a .pom file which looks like xml with some depedencies inside, I wonder if I should this .pom file as well?
I've created an aar (mine.aar) that references another aar (other.aar).
I have the source code from both aar and both are kept locally (in the libs directory).
I only want to distribute mine.aar so whoever adds it to its project, only needs to add one local file because the code from other.aar would be "inside" of mine.aar
When I add mine.aar to a project I'm getting:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
/Users/kodiak/.gradle/caches/transforms-2/files-2.1/cc11357a55d4d7c90e9854a3725b5e6d/res/layout/activity_item.xml:17: AAPT: error: attribute libappbarlayout_fitsystem (aka com.awproject:libitembarlayout_fitsystem) not found.
Where layout/activity_item.xml is a layout in mine.aar that references a custom view from other.aar and libitembarlayout_fitsystem is an attribute of this custom view.
So my question is:
Is it possible to ship mine.aar with the code from other.aar?
I read the documentation about the use of aapt2 here. In particular the Compile section.
I have a decompiled AndroidManifest.xml file (with apktool) from some application and now I want to re-compile it back.
When I am using aapt2 to do it like that:
C:\Users\myuser\AppData\Local\Android\Sdk\build-tools\26.0.2\aapt2.exe compile C:\tmp\AndroidManifest.xml -o c:\tmp\compiled_folder
It is failed with the error:
error: invalid file path 'C:\tmp\AndroidManifest.xml'.
Why it writes me that the file is invalid ? it's a regular XMLfile.
I needed to use only files from the resource folder because it supports only resource files:
https://developer.android.com/guide/topics/resources/available-resources
And AndroidManifest.xml is not consider as resource.
i tried to create an app widget.. i can run the widget in emulator.. but i cann't build it as apk file
Below is the error
Android resource linking failed
Output:
F:\me\Workspace\example\base\build\intermediates\merged_manifests\
debugFeature\processDebugFeatureManifest\merged\AndroidManifest.xml:102:
error: resource xml/ptcwidget_info (aka com.example.app:xml/widget_info)
not found.
error: failed processing manifest.
but this widget_info.xml is under UIModule.. this merged manifest file is not finding xml folder under resources
Check gradle implementations, if you did add library it can be merge. Or try rename the xml file and sync project with gradle file.Files may be overlapped
I occurred build error:
AGPBI: {"kind":"simple","text":"ERROR: Asset package include \u0027D:\\AndroidSDK\\android-sdk-windows\\platforms\\android-23\\android.jar\u0027 not found.","sources":[{}]}
within Android Studio(D:\AndroidSDK\android-sdk-windows\platforms\android-23\android.jar is the path I replace original Android's android.jar with my customized android.jar).
The strange parts are
1.The android.jar did exist under the path
2.The project "sometimes" build pass(apk generated) but found the error mentioned above most of the time.
Is someone had occurred the same problem?