Missing style attribute after adding .aar library - android

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?

Related

Appropriate Paths for Resources in AndroidManifest.xml

in my AndroidManifest.xml, I have
<application
android:icon="#drawable/iC_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
And when I run gradle build, I keep getting the errors
resource drawable/ic_launcher (aka com.example.MyProject:drawable/ic_launcher) not found
resource string/app_name (aka com.example.MyProject:string/app_name) not found
resource style/AppTheme (aka com.example.MyProject:style/AppTheme) not found
I'm guessing that the #drawable #string and #style correspond to the directories with the same names I've seen before when I used Android Studio. But now that I don't use Android Studio anymore, where should I put them?
Currently my Java files are located in
app/src/main/java/MyProject
and my AndroidManifest.xml file is located in
app/src/main/AndroidManifest.xml
The directories are generated via gradle init; do I need to rearrange them?
I'm guessing that the #drawable #string and #style correspond to the directories with the same names I've seen before when I used Android Studio
There is no style directory and there is no string directory. Style and string resources go in a values directory.
But now that I don't use Android Studio anymore, where should I put them?
The same place that Android Studio puts them, and the same place that they are in any Android project. For a module named app and a source set named main, you would create subdirectories under app/src/main/res for different resource types and resource sets.
FWIW, this free book of mine explains all of this.

aapt2 link errors about resource files not found

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.

Create android aar that contains another android arr

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?

Android resource linking failed on build APK

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

Android Studio build error: AGPBI: {"kind":"simple","text":"ERROR: Asset package includ

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?

Categories

Resources