fat-aar-android
fat-aar-android copied to clipboard
fix missing resources when using AGP 7.3.X
Fixes
- https://github.com/kezong/fat-aar-android/issues/402
- https://github.com/kezong/fat-aar-android/issues/399
Changelog
- use registerGeneratedResFolders to merge resources
Use the fixed version in your project
Until this MR gets merged you need to use jitpack to get a version of the library that includes this fix. I created a new branch for this because i also had to modify the publishing config: https://github.com/AndreasBoehm/fat-aar-android/tree/fix-missing-resources-jitpack
Details can be found here: https://jitpack.io/#AndreasBoehm/fat-aar-android/da3ac00990
Thanks for sharing this AndreasBoehm
Hi @AndreasBoehm, Thanks for your help, Would you please guide me about, How I can use your branch, in my code as classpath? Thanks in advance
HI @tareq-threls, i added a guide to the MR description that describes how you can use those changes in your project.
Hi @AndreasBoehm could you please check this issue once https://github.com/kezong/fat-aar-android/issues/406
Hi @AndreasBoehm could you please check this issue once #406
You need to use the fixed version of the library to fix this issue. Please take a look at the the description of this issue (#403) for how to do that.
Hi @AndreasBoehm could you please check this issue once #406
You need to use the fixed version of the library to fix this issue. Please take a look at the the description of this issue (#403) for how to do that.
I integrated the jitpack library you mentioned above, but still the fat-aar not including the drawables.
Hie @AndreasBoehm thank you for trying to fix this.
We implemented the changes you mentioned but are getting the following errors:
> Task :sample:processDebugResources FAILED
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/.../extension/build/intermediates/packaged_res/debug/layout/entities_layout.xml","position":{"startLine":20}}],"original":"ERROR:/.../extension/build/intermediates/packaged_res/debug/layout/entities_layout.xml:21: AAPT: error: attribute navGraph (aka com.example.odkshellapp:navGraph) not found.\n ","tool":"AAPT"}
....
Execution failed for task ':sample:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
ERROR:/.../extension/build/intermediates/packaged_res/debug/layout/entities_layout.xml:21: AAPT: error: attribute navGraph (aka com.example.odkshellapp:navGraph) not found.
The code we are working with open source and you can check it here: https://github.com/Samagra-Development/odk-collect-extension/tree/feature/library-publish-github-action.
We are working on checking this in-parallel but any help from you would be greatly appreciated.
Hie @AndreasBoehm thank you for trying to fix this.
We implemented the changes you mentioned but are getting the following errors:
> Task :sample:processDebugResources FAILED AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"/.../extension/build/intermediates/packaged_res/debug/layout/entities_layout.xml","position":{"startLine":20}}],"original":"ERROR:/.../extension/build/intermediates/packaged_res/debug/layout/entities_layout.xml:21: AAPT: error: attribute navGraph (aka com.example.odkshellapp:navGraph) not found.\n ","tool":"AAPT"} .... Execution failed for task ':sample:processDebugResources'. > A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction > Android resource linking failed ERROR:/.../extension/build/intermediates/packaged_res/debug/layout/entities_layout.xml:21: AAPT: error: attribute navGraph (aka com.example.odkshellapp:navGraph) not found.The code we are working with open source and you can check it here: Samagra-Development/odk-collect-extension@
feature/library-publish-github-action.We are working on checking this in-parallel but any help from you would be greatly appreciated.
Hi @karntrehan,
I saw that you are using the DSL plugins { } to apply the fat-aar plugin without having defined pluginManagement in your settings.gradle file.
This means that you are still using the official fat-aar library. See here: https://docs.gradle.org/current/userguide/plugins.html#sec:custom_plugin_repositories
You can either add pluginManagement or use the plugin version that you specified with classpath using the following line apply plugin: 'com.kezong.fat-aar'.
Best, Andi
Still not effective, the configuration is as follows(AGP: 7.4.0 gradle:7.5)
root build.gradle buildscript { dependencies { classpath 'com.github.kezong:fat-aar:1.3.8' } }
module build.gradle plugins { id("com.kezong.fat-aar") }
dependencies { implementation("com.github.AndreasBoehm:fat-aar-android:da3ac00990") embed("com.custom.aar") }
I feel that I didn't use your change, where is the wrong?
The document is written wrong dependencies { classpath 'com.github.kezong:fat-aar:1.3.8' } Change to the following statement dependencies { classpath 'com.github.AndreasBoehm:fat-aar-android:da3ac00990' }
any predictions for the merger to be carried out?
I don't think that this will ever get merged.