Issue with Android compileSdkVersion 35
Hi,
I am using the last version 1.4.0.
I compile on Android 35 (emulator API 35), flutter clean, uninstall/reinstall the app, copied/paste the example project and a get this error:
E/com.shockwave.pdfium.PdfiumCore(21440): Native libraries failed to load - java.lang.UnsatisfiedLinkError: dlopen failed: empty/missing DT_HASH/DT_GNU_HASH in "/data/app/~~96vg8cUTNWpGfknOldhc4g==/com.maestro.kalexa.dev-p9Tse7llHaNfuFLQs3vKow==/lib/arm64/libc++_shared.so" (new hash type from the future?)
D/com.shockwave.pdfium.PdfiumCore(21440): Starting PdfiumAndroid 1.9.2
E/stro.kalexa.dev(21440): No implementation found for long com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(int, java.lang.String) (tried Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument and Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument__ILjava_lang_String_2) - is the library loaded, e.g. System.loadLibrary?
I/flutter (21440): java.lang.UnsatisfiedLinkError: No implementation found for long com.shockwave.pdfium.PdfiumCore.nativeOpenDocument(int, java.lang.String) (tried Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument and Java_com_shockwave_pdfium_PdfiumCore_nativeOpenDocument__ILjava_lang_String_2) - is the library loaded, e.g. System.loadLibrary?
If I switch to compileSdk = 34 and run on Emulator API 34 it works
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.27.1, on macOS 14.5 23F79 darwin-arm64, locale fr-ES)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.93.1)
[✓] Connected device (6 available)
[✓] Network resources
• No issues found!
Thanks in advance
The same thing happens to me with version 1.4.0, any solution?
Have similar bug, found answer in https://github.com/DImuthuUpe/AndroidPdfViewer f you are using ProGuard, add following rule to proguard config file:
-keep class com.shockwave.** but I add: -keep class com.shockwave.** { *; }
and it works for me
I think this is the reason: https://android-developers.googleblog.com/2025/05/prepare-play-apps-for-devices-with-16kb-page-size.html
Any updates about fix???