Description: apk package is broken Steps to Reproduce: 1. download a apk package(daily/master/Android-ARM@86-TDF) 2. install apk package 3. run LibreOffice Viewer 4. tap a odf file Actual Results: Crash a LibreOffcie Viewer Expected Results: Open a odt file Reproducible: Always User Profile Reset: No Additional Info: Good: Android-ARM@86-TDF / 2020-07-02_15.32.14 Version: 7.1.0.0.alpha0+ BuildID: 656fd1e Broken: Android-ARM@86-TDF / 2020-07-08_12.50.23 Version: 7.1.0.0.alpha0+ BuildID: a7350a3 Date: 2020-07-06_22.24.08 File Size: 69950664 Date: 2020-07-15_10.58.22 File Size: 13212930 Too small?
Crash when opening an ODT file reproduced with current daily build "android~2020-07-17_01.14.12_LibreOfficeViewer-strippedUIEditing-debug.apk": Version: 7.1.0.alpha0+ Build ID: a3e52f6 ADB logcat output contains this: 07-17 08:12:03.142 23785 23785 E AndroidRuntime: FATAL EXCEPTION: main 07-17 08:12:03.142 23785 23785 E AndroidRuntime: Process: org.example.libreoffice, PID: 23785 07-17 08:12:03.142 23785 23785 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.example.libreoffice-oWIFy_eU7DU072HlUBKt7g==/base.apk"],nativeLibraryDirectories=[/data/app/org.example.libreoffice-oWIFy_eU7DU072HlUBKt7g==/lib/arm64, /system/lib64, /system/vendor/lib64]]] couldn't find "libnspr4.so" 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:1012) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1669) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at org.libreoffice.kit.NativeLibLoader.load(LibreOfficeKit.java:92) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at org.libreoffice.kit.LibreOfficeKit.<clinit>(LibreOfficeKit.java:82) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at org.libreoffice.kit.LibreOfficeKit.initializeLibrary(LibreOfficeKit.java:35) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at org.libreoffice.TileProviderFactory.initialize(TileProviderFactory.java:23) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at org.libreoffice.LOKitThread.<init>(LOKitThread.java:40) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at org.libreoffice.LibreOfficeMainActivity.onCreate(LibreOfficeMainActivity.java:159) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7327) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:7318) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1275) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3101) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3264) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1955) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at android.os.Looper.loop(Looper.java:214) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7078) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) 07-17 08:12:03.142 23785 23785 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
Thanks to the really helpful information in the bug report, it was quite easy to find the relevant commit at which this most probably regressed. Fix pending here: https://gerrit.libreoffice.org/c/core/+/98970 The APK built using 'gradlew' or from Android Studio is fine again for me with that change in place. Side note: For some reason still unknown to me, just clicking "Run" in Android Studio to deploy the app directly to a device/AVD still does not include the native libraries, but that might be a different issue (or something's broken in my Android Studio setup...).
(In reply to Michael Weghorn from comment #2) > Side note: For some reason still unknown to me, just clicking "Run" in > Android Studio to deploy the app directly to a device/AVD still does not > include the native libraries, but that might be a different issue (or > something's broken in my Android Studio setup...). Turned out that the AVD is an x86_64 one and the build was for x86, so Android Studio decided not to ship the x86 libraries since it's another architecture - while using an APK containing x86 libs naturally just works. (I think that used to be different previously, but anyway, it's not relevant here...)
Michael Weghorn committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/bc6c034ba0bc163bfd6f437582ee3dbdcffbe81f tdf#134846 Android Viewer: Include native libs again It will be available in 7.1.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Cannot reproduce new build. Android-ARM@86-TDF / 2020-07-20_04.01.00 Version: 7.1.0.0.alpha0+ BuildID: 856f0f2 Thanks for fixing this! -> v.