App crashes on start on Samsung Oreo devices because of dex issue
See original GitHub issueRunning a release variant of React Native app on Samsung Oreo (8) devices leads to a crash:
java.lang.RuntimeException:
Unable to instantiate application com.pershop.pershop.MainApplication:
java.lang.ClassNotFoundException: Didn't find class "com.pershop.pershop.MainApplication"
on path: DexPathList[[zipfile....]]
at android.app.LoadedApk.makeApplication (LoadedApk.java:977)
at android.app.ActivityThread.handleBindApplication (ActivityThread.java:6030)
at android.app.ActivityThread.-wrap1 (Unknown Source)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1764)
at android.os.Handler.dispatchMessage (Handler.java:105)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6938)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
App runs fine on non-Samsung devices. (and iOS FWIW)
Environment
React Native Environment Info:
System:
OS: macOS High Sierra 10.13.6
CPU: (4) x64 Intel(R) Core(TM) i7-4650U CPU @ 1.70GHz
Memory: 68.29 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.5.0 - /usr/local/bin/node
npm: 6.1.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 25, 26, 27, 28
Build Tools: 27.0.3, 28.0.2, 28.0.3
System Images: android-27 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.57.8 => 0.57.8
npmGlobalPackages:
react-native-cli: 2.0.1
Description
Created a release version of Android app and any users that install it on Samsung Oreo devices report a crash. (see more above)
Reproducible Demo
You can download and run this app on any Samsung device and see the crash.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to fix apps that keep crashing and freezing - Samsung
How to fix apps that keep crashing and freezing ; Step 1. Switch off your mobile data/Wi-Fi router for about a few minutes....
Read more >Why are my Android phone apps crashing or closing & how to ...
Find out why your Samsung Galaxy Android phone apps keep crashing, closing, freezing or stop working. Fix the issue with our guide and...
Read more >How to fix apps keep crashing and freezing | Samsung CA
Step 1. Switch off your mobile data/Wi-Fi router for about a few minutes. Step 2. Turn off your device and Restart it again....
Read more >How to fix apps keep crashing and freezing? - Samsung
Step 1. Switch off your mobile data/Wi-Fi router for about a few minutes. ; Step 2. Turn off your device and Restart it...
Read more >Solved: Dex Crashes Upon Starting Financial Apps - 941367
userUwP3wButxz. Constellation · 11-07-2019 06:13 PM (Last edited 11-07-2019 06:47 PM ) in. Samsung Apps and Services · Hi, my Dex (on Windows) ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had a similar issue before, I fixed it by forcing Java 8 in app/build.gradle.
@tonyd3 is right. I scrolled up the crash logs and there was a line that complained about Java8. Explicitly setting Java8 solve the issue. Thanks!