Support 16 KB page sizes for Android 15
Closed this issue · 2 comments
yuukis commented
Sample project app crashes after startup when running on AVD with 16 KB page sizes.
I think this library needs to be built to support for 16 KB devices.
Source:
FATAL EXCEPTION: main
Process: pl.droidsonroids.gif.sample, PID: 3529
java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH/DT_GNU_HASH in "/data/data/pl.droidsonroids.gif.sample/app_lib/libpl_droidsonroids_gif.so" (new hash type from the future?)
at java.lang.Runtime.load0(Runtime.java:933)
at java.lang.System.load(System.java:1729)
at com.getkeepsafe.relinker.SystemLibraryLoader.loadPath(SystemLibraryLoader.java:31)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibraryInternal(ReLinkerInstance.java:206)
at com.getkeepsafe.relinker.ReLinkerInstance.loadLibrary(ReLinkerInstance.java:136)
at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:70)
at com.getkeepsafe.relinker.ReLinker.loadLibrary(ReLinker.java:51)
at pl.droidsonroids.gif.LibraryLoader.loadLibrary(LibraryLoader.java:51)
at pl.droidsonroids.gif.GifInfoHandle.<clinit>(GifInfoHandle.java:27)
at pl.droidsonroids.gif.InputSource$AssetSource.open(InputSource.java:160)
at pl.droidsonroids.gif.InputSource.createHandleWith(InputSource.java:37)
at pl.droidsonroids.gif.InputSource.createGifDrawable(InputSource.java:33)
at pl.droidsonroids.gif.GifDrawableInit.build(GifDrawableInit.java:64)
at pl.droidsonroids.gif.sample.sources.GifSourcesAdapter.onBindViewHolder(GifSourcesAdapter.kt:30)
at pl.droidsonroids.gif.sample.sources.GifSourcesAdapter.onBindViewHolder(GifSourcesAdapter.kt:13)
at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7065)
at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7107)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6012)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6279)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1627)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4134)
at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3851)
at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4404)
at android.view.View.layout(View.java:25388)
at android.view.ViewGroup.layout(ViewGroup.java:6466)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:25388)
at android.view.ViewGroup.layout(ViewGroup.java:6466)
at androidx.recyclerview.widget.RecyclerView$LayoutManager.layoutDecoratedWithMargins(RecyclerView.java:9587)
at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1685)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:665)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4134)
at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3851)
at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4404)
at android.view.View.layout(View.java:25388)
at android.view.ViewGroup.layout(ViewGroup.java:6466)
at androidx.viewpager2.widget.ViewPager2.onLayout(ViewPager2.java:527)
at android.view.View.layout(View.java:25388)
at android.view.ViewGroup.layout(ViewGroup.java:6466)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
at android.view.View.layout(View.java:25388)
at android.view.ViewGroup.layout(ViewGroup.java:6466)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:25388)
at android.view.ViewGroup.layout(ViewGroup.java:6466)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
at android.view.View.layout(View.java:25388)
at android.view.ViewGroup.layout(ViewGroup.java:6466)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:784)
at android.view.View.layout(View.java:25388)
at android.view.ViewGroup.layout(ViewGroup.java:6466)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:4703)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3959)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2836)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:10145)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1406)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1415)
at android.view.Choreographer.doCallbacks(Choreographer.java:1015)
at android.view.Choreographer.doFrame(Choreographer.java:945)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1389)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8674)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
yuukis commented
After changing the following two code lines, I confirmed that the sample project app is launched.
/android-gif-drawable/build.gradle
android {
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
externalNativeBuild {
cmake {
- arguments "-DANDROID_PLATFORM=android-$versions.minSdk", "-DANDROID_STL=none"
+ arguments "-DANDROID_PLATFORM=android-$versions.minSdk", "-DANDROID_STL=none", "-DANDROID_SUPPORT_FLEXIBLE_PAGE_SIZES=ON"
cFlags '-std=c11', '-Weverything', '-Wall'
if (isDevelopmentBuild()) {
cFlags '-DDEBUG', '-g'
/build.gradle
buildscript {
compileSdk : 34,
targetSdk : 33,
minSdk : 17,
- ndk : '26.1.10909125',
+ ndk : '27.0.11902837',
androidxAppcompat : '1.6.1',
lifecycle : '2.6.2',
androidxAnnotations: '1.6.0',
koral-- commented
Thanks, I'll check that, and publish version compiled with NDK r27 ASAP.