Increasing minSdkVersion result in "couldn't find DSO to load: libhermes.so" (Hermes is disabled)
See original GitHub issueSummary
- Init new expo project
- Install expo-dev-client
- Increase minSdkVersion to 23 (or higher)
- Run android
Expected: App launches successfully Actual: App crashes with “couldn’t find DSO to load: libhermes.so”
! Cannot reproduce it on expo sdk below 45 ! Cannot reproduce it with minSdkVersion below 23
Managed or bare workflow? If you have made manual changes inside of the ios/
or android/
directories in your project, the answer is bare!
bare
What platform(s) does this occur on?
Android
Package versions
expo: 45.0.0 (and above) expo-dev-client: 0.9.5 expo-cli: 5.4.3
Environment
expo-env-info 1.0.3 environment info: System: OS: macOS 12.3.1 Shell: 5.8 - /bin/zsh Binaries: Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node Yarn: 1.22.17 - /opt/homebrew/bin/yarn npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.4, macOS 12.3, tvOS 15.4, watchOS 8.5 IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8139111 Xcode: 13.3.1/13E500a - /usr/bin/xcodebuild npmPackages: expo: ~45.0.0 => 45.0.3 react: 17.0.2 => 17.0.2 react-dom: 17.0.2 => 17.0.2 react-native: 0.68.2 => 0.68.2 react-native-web: 0.17.7 => 0.17.7 npmGlobalPackages: eas-cli: 0.52.0 expo-cli: 5.4.3 Expo Workflow: bare
Reproducible demo
- expo init repro (Choose “Bare”)
- cd repro
- expo run:android (Confirm it’s working)
- yarn add expo-dev-client
- In
android/build.gradle
change “minSdkVersion” to 23 (or higher) - expo run:android
The only change I’ve made: build.gradle.txt
Stacktrace (if a crash is involved)
Emulator:
couldn’t find DSO to load: libhermes.so SoSource 0: com.facebook.soloader.DirectorySoSource/root =/data/app/
_Nu-VQEApH6ceehdAR6F6A==/ com.repro-ruyBOYzemz5NfvtXev8gmw==/lib/ arm64 flags = 0) SoSource 1: com.facebook.soloader.DirectApkSoSource[root =/data/app/_Nu-VQEApH6ceehdAR6F6A==/ com.repro-ruyBQYzemz5NfvtXev&gmw==/ base.apk!/lib/arm64-v8al SoSource 2: com.facebook.soloader.DirectorySoSource root =/system/lib64 flags = 21 SoSource 3: com.facebook.soloader. DirectorySoSource/root =/vendor/lib64 flags = 21 Native lib dir: /data/app/ ~~_Nu-VQEApH6ceehdAR6F6A==/ com.repro-ruyBOYzemz5NfvtXev8gmw==/lib/ arm64 result: 0
ADB:
15830 15830 D CompatibilityChangeReporter: Compat change id reported: 171228096; UID 10152; state: ENABLED 361 408 D goldfish-address-space: claimShared: Ask to claim region [0x1f159c000 0x1f1f04000] 361 408 D goldfish-address-space: claimShared: Ask to claim region [0x1f1f04000 0x1f286c000] 361 408 D goldfish-address-space: claimShared: Ask to claim region [0x1f4000000 0x1f4968000] 544 559 I ActivityTaskManager: Displayed com.repro/expo.modules.devlauncher.launcher.errors.DevLauncherErrorActivity: +556ms 714 830 D EGL_emulation: app_time_stats: avg=10007.88ms min=10007.88ms max=10007.88ms count=1 544 1604 W InputManager-JNI: Input channel object ‘be06ef7 com.repro/expo.modules.devlauncher.launcher.DevLauncherActivity (client)’ was disposed without first being removed with the input manager! 544 1604 W InputManager-JNI: Input channel object ‘6ab9eff com.repro/com.repro.MainActivity (client)’ was disposed without first being removed with the input manager! 1353 1353 I GoogleInputMethodService: GoogleInputMethodService.onFinishInput():3269 1353 1353 I GoogleInputMethodService: GoogleInputMethodService.onStartInput():1947 1353 1353 I DeviceUnlockedTag: DeviceUnlockedTag.notifyDeviceLockStatusChanged():79 Notify device unlocked. 397 397 W SurfaceFlinger: couldn’t log to binary event log: overflow. 544 1604 W InputManager-JNI: Input channel object ‘c14c71a Splash Screen com.repro (client)’ was disposed without first being removed with the input manager! 714 830 D EGL_emulation: app_time_stats: avg=15.33ms min=0.97ms max=34.54ms count=54 15830 15857 D SoLoader: libreactnativejni.so not found on /data/app/~~_Nu-VQEApH6ceehdAR6F6A==/com.repro-ruyB0Yzemz5NfvtXev8gmw==/lib/arm64 15830 15857 D SoLoader: libreactnativejni.so found on DirectAPKSoSource: 4 15830 15873 D EGL_emulation: app_time_stats: avg=134.19ms min=1.73ms max=1441.09ms count=11 714 830 D EGL_emulation: app_time_stats: avg=19.14ms min=1.08ms max=101.37ms count=38 1024 1797 E ActivityThread: Failed to find provider info for com.google.android.apps.wellbeing.api 373 373 E android.hardware.power.stats@1.0-service-mock: Failed to getEnergyData 1024 1797 E ActivityThread: Failed to find provider info for com.google.android.apps.wellbeing.api
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:8 (3 by maintainers)
try to add this to app/build.gradle
Same issue with the manage workflow. I tried to use the workaround by adding a packagingOptions with “expo-build-properties”, without success. Relevant code of
app.config.ts
:I guess that it’s a bug in the plugin which does not seem to consider
jniLibs
as a possible option to be added topackagingOptions
. The relevant part of thebuild.grade
file afterexpo prebuild
isSo my solution was to create an expo plugin that adds a line to
build.gradle
. Namely:This solution seemed to work.