Android Question B4XGifView and 16kb alignment

I got in google play console apps using B4XGifView displaying:
B4X:
Does not support 16 KB
Hide detail
Learn more
Uncompressed native libraries are not zip aligned for 16 KB within your app. To resolve this, fix your AGP configuration.

Libraries that do not support 16 KB:
base/lib/arm64-v8a/libpl_droidsonroids_gif.so
base/lib/x86_64/libpl_droidsonroids_gif.so

And after I updated the B4xgifview library as per: https://www.b4x.com/android/forum/threads/b4x-b4xgifview-cross-platform-animated-gif-view.118550

And I made a new app release for the apps. Now I get the following error message in all effected apps:
B4X:
Uncompressed native libraries are not zip aligned for 16 KB within your app. To resolve this, fix your AGP configuration.

No more getting this part:
B4X:
Libraries that do not support 16 KB:
base/lib/arm64-v8a/libpl_droidsonroids_gif.so
base/lib/x86_64/libpl_droidsonroids_gif.so

But still there's a 16 kb page size error shown above.

Google says to update build.gradle, yet B4A doesn't use it
B4X:
Update the packaging of your shared libraries
We recommend that you upgrade to AGP version 8.5.1 or higher and use uncompressed shared libraries.



AGP version 8.5.1 or higher
16 KB devices require apps that ship with uncompressed shared libraries to align them on a 16 KB zip-aligned boundary. To do this, you need to upgrade to Android Gradle Plugin (AGP) version 8.5.1 or higher. Refer to the Android Gradle plugin Upgrade Assistant section for details on the upgrade process.



AGP version 8.5 or lower
Note: In AGP version 8.3 to 8.5, apps are 16 KB aligned by default. However, bundletool does not zipalign APKs by default. So, the app may appear to work, but when built from a bundle in Play, it won't install.

If you can't upgrade AGP to version 8.5.1 or higher, then the alternative is to switch to use compressed shared libraries. Update your Gradle configuration to have Gradle compress your shared libraries when packaging your app to avoid app installation issues with unaligned shared libraries.



GroovyKotlin
In your build.gradle file, add the following option:





android {

  ...

  packagingOptions {

      jniLibs {

        useLegacyPackaging true

      }

  }

}
 
I also found that in paths, a path to android-33 was set, despite android-35 and 36 are installed, but not pointed to. So I updated it to android-35 folder that has android.jar. Also updated build-tools folder path to folder that has 35 and 36. Cleaned the project and recompiled it, still google play showed mentioned error when creating a new app release
 
Upvote 0
This thread posted that those are from B4XGifView:

And indeed they disappeared in google play console after updating B4XGifView and recompiling, but still 16 kb error is there, like I clarified in thread

I attached libraries names used in two effected apps
 

Attachments

  • 2025-10-26_08-34-26.png
    2025-10-26_08-34-26.png
    5.6 KB · Views: 7
  • 2025-10-26_08-35-58.png
    2025-10-26_08-35-58.png
    8.7 KB · Views: 7
Last edited:
Upvote 0
Seems they are for GifDecoder library, will test as well powershell script to check apk

Other members can confirm to which library those files belongs. And if it will be updated (or is updated)
 
Upvote 0

AnandGupta

Expert
Licensed User
Longtime User
Best to create a new app with B4XGifView and upload. You create as many app and upload to G Console, just do not publish, if it is not for public.
This way you will be sure where the problem is.
You may have to add other libraries one by one and upload to check.
 
Upvote 0
I discovered that B4XGifView is not used by either apps it's included at. Instead GifDecoder is used. So, I removed B4XGifView, and recompiled, and uploaded aab to create a release, and now it shows:

B4X:
Supports 16 KBYou may still have errors if your app uses libraries that we couldn't detect, or if your code assumes a device is using a specific page size. Learn more

So, like I said, updating B4XGifView removed the message:
B4X:
Libraries that do not support 16 KB: base/lib/arm64-v8a/libpl_droidsonroids_gif.so base/lib/x86_64/libpl_droidsonroids_gif.so

So, this is weird
 
Upvote 0
Sorry for that, I just reported my experience and what I got. I made sure B4XGifView is updated like attached screenshot. I will edit the last post and remove the possible misinformation. Thank you for your support
image_2025-10-26_154259083.png
 
Upvote 0
Top