Create android aar that contains another android arr - android

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?

Related

Missing style attribute after adding .aar library

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?

Modules 'base' and 'instantapp' contain entry 'assets/crashlytics-build.properties' with different content

I am generating Signed Build Bundle.
Instant App Module is launching perfectly in device but when I am generating Signed Build Bundle I got this error.
'Modules 'base' and 'instantapp' contain entry 'assets/crashlytics-build.properties' with different content'
In my assets folder 'crashlytics-build.properties' file is not showing.
Error logs :
What went wrong:
Execution failed for task ':quickRide:packageQrReleaseBundle'.
java.util.concurrent.ExecutionException: com.android.tools.build.bundletool.exceptions.ValidationException: Modules 'base' and 'AdharVerificationDynamicFeature' contain entry 'assets/crashlytics-build.properties' with different content.
i solve this problem by changing the name of file in my module and its worked

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

Xamarin android binding library __AndroidNativeLibraries__.zip.new not found

I'm building a binding library which consists of a .jar file and an associated .so file.
The jar file is set with a build action of embeddedjar, while the .so file is set with a build action of embeddednativelibrary
The above is background to the error I'm getting when building the library.
I'm getting the error below:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Bindings.targets: Error: Error executing task CreateNativeLibraryArchive: /Users/jameslavery/Projects/DeviceAPI-Custom/DeviceAPI-Custom/obj/Debug/__AndroidNativeLibraries__.zip.new does not exist (DeviceAPI-Custom)
It appears that the intermediate file
__AndroidNativeLibraries.zip__.new
isn't being created.
Any thoughts/solution?

using android gradle plugin to run aapt

I have a custom gradle build file and i need to run aapt with various params (to extract package names and recompile resources in a custom made resource directory).
For the time being i'm iterating over the directories of ../sdk/build-tools/* and taking the latest dir (most recent).
However i know that there's a gradle android plugin and that it has inside an aapt task or a method to control it.
Can i apply the android plugin and use only the aapt command in my task/ groovy class ?
10x.
10x once again stack overflow for the flood of answers i got while all the idiotic questions are being answered...
i didn't find a way to do it, but i use the following a separate gradle file with a class that encapsulate finding the aapt and running it, then i use apply from: 'xxx.gradle'
and in the included file i use ext.aapt= new AaptRunner(); then i can use aapt object in the original build script.

Categories

Resources