Android Code Snippet Fix Big size APK in SDK 34 (NotoColorEmojiCompat.ttf)

As two topic and after update to newest b4a version, my apk size very big (+9MB because file NotoColorEmojiCompat.ttf which only use Android Kitkat ):
This problem cause by Appcompat library use :emoji2 bundled library , and some bugs about customview-poolingcontainer too.

So this is my fix:
1. Download all files from my zip, copy it to your external library.
2. Replace your Appcompat library in internal library OR you can delete form internal library and copy these files to external library folder (because default b4a will use form internal appcompat library, we need update it by replace it or use external library )
3. Add these line to your project:
B4X:
#AdditionalJar:customview-poolingcontainer-1.0.0.aar
#AdditionalJar:emoji2-1.0.0.aar
#AdditionalJar:emoji2-views-helper-1.0.0.aar
Enjoy! Now APK size will be - 9(10MB). Please test and comment for me to fix more!
 

Attachments

  • Fix Size Appcompat.rar
    329.4 KB · Views: 133

Theera

Expert
Licensed User
Longtime User
As two topic and after update to newest b4a version, my apk size very big (+9MB because file NotoColorEmojiCompat.ttf which only use Android Kitkat ):
This problem cause by Appcompat library use :emoji2 bundled library , and some bugs about customview-poolingcontainer too.

So this is my fix:
1. Download all files from my zip, copy it to your external library.
2. Replace your Appcompat library in internal library OR you can delete form internal library and copy these files to external library folder (because default b4a will use form internal appcompat library, we need update it by replace it or use external library )
3. Add these line to your project:
B4X:
#AdditionalJar:customview-poolingcontainer-1.0.0.aar
#AdditionalJar:emoji2-1.0.0.aar
#AdditionalJar:emoji2-views-helper-1.0.0.aar
Enjoy! Now APK size will be - 9(10MB). Please test and comment for me to fix more!
Is there the example for test? I would like to test it.
 

asales

Expert
Licensed User
Longtime User
Is there the example for test? I would like to test it.
Do you use the AppCompat lib in your apps?
Due this problem of size, I remove it from my apps.
See this aswer from Erel about this lib:
 
Top