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
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 want to build aab to upload CH Play but it always fails and shows a message:
Execution failed for task ':app:packageReleaseBundle'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> File 'root/res/drawable-hdpi/ic_launcher.png' uses reserved file or directory name 'res'.
I tried to search ic_launcher.png but my app does not use that name.
Note: I added 'ic_launcher.png' in the folder drawable but it still errors.
Please help me with this issue. Thanks in advance!
'res' is android application reserved directory name, try to change 'root/res' for another name
I suspect you depend on a jar which should be an aar.
Jars don't have the concept of Android resources, so when the app bundle is built, it would consider the "res" directory as a a regular directory that would thus be packaged under "root".
Resources can be packaged in aar files, which would then be packaged properly.
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?
Error:Execution failed for task ':app:mergeDebugResources'.
C:\Users\user\AndroidStudioProjects\BrainTrain\app\src\main\res\mipmap-hdpi\USER-PC.eml: Error: The file name must end with .xml or .png
This error as been occurring ever after closing my Android studio
You put a file, named USER-PC.eml in res/mipmap-hdpi/. That is not a valid filename for that directory (wrong extension, dashes not allowed), and quite possibly it is not a valid file for that directory.
So, remove it from the project for now.
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?