question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Crashes on emulator

See original GitHub issue

🐛 Bug Report

Crashes on emulator. It’s getting really difficult to justify Flipper, a debug tool shouldn’t crash and block the development process.

To Reproduce

Build & Run

Environment

Emulator: Pixel 3 API 28, x86 Flipper: 0.30.1 Soloader: 0.8.0

    com.facebook.soloader.SoLoader$WrongAbiError: APK was built for a different platform
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:645)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:525)
        at com.facebook.soloader.NativeLoaderToSoLoaderDelegate.loadLibrary(NativeLoaderToSoLoaderDelegate.java:24)
        at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:43)
        at com.facebook.jni.HybridData.<clinit>(HybridData.java:31)
        at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:25)
     Caused by: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libfbjni.so caused by: dlopen failed: "/data/data/de.zalon.android.debug/lib-main/libfbjni.so" has unexpected e_machine: 40 (EM_ARM)
        at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:789)
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:639)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577) 
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:525) 
        at com.facebook.soloader.NativeLoaderToSoLoaderDelegate.loadLibrary(NativeLoaderToSoLoaderDelegate.java:24) 
        at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:43) 
        at com.facebook.jni.HybridData.<clinit>(HybridData.java:31) 
        at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:25) 
E/AndroidRuntime: FATAL EXCEPTION: FlipperConnectionThread
    Process: de.zalon.android.debug, PID: 13538
    java.lang.NoClassDefFoundError: <clinit> failed for class com.facebook.flipper.android.EventBase; see exception in other thread
        at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:25)
E/CrashLogHandler: Stack trace: java.lang.NoClassDefFoundError: <clinit> failed for class com.facebook.flipper.android.EventBase; see exception in other thread
        at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:25)
E/CrashLogHandler: Stack trace: com.facebook.soloader.SoLoader$WrongAbiError: APK was built for a different platform
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:645)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:525)
        at com.facebook.soloader.NativeLoaderToSoLoaderDelegate.loadLibrary(NativeLoaderToSoLoaderDelegate.java:24)
        at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:43)
        at com.facebook.jni.HybridData.<clinit>(HybridData.java:31)
        at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:25)
     Caused by: java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libfbjni.so caused by: dlopen failed: "/data/data/de.zalon.android.debug/lib-main/libfbjni.so" has unexpected e_machine: 40 (EM_ARM)
        at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:789)
        at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:639)
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:577) 
        at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:525) 
        at com.facebook.soloader.NativeLoaderToSoLoaderDelegate.loadLibrary(NativeLoaderToSoLoaderDelegate.java:24) 
        at com.facebook.soloader.nativeloader.NativeLoader.loadLibrary(NativeLoader.java:43) 
        at com.facebook.jni.HybridData.<clinit>(HybridData.java:31) 
        at com.facebook.flipper.android.FlipperThread.run(FlipperThread.java:25) 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

65reactions
atomractcommented, Nov 25, 2020

go to android>app inside app delete build folder and rebuild the application again it worked for me very well. Also you can look for gradlew clean

14reactions
bizzguycommented, Jan 21, 2020

We had a very similar problem in our Android builds. When inspecting the APK we noticed that the correct “so” libraries were not being included in the “lib/****” directories. It occured when we went from version “0.28.0” to “0.30.0” of the Flipper SDK.

We actually had to completely get rid of the library cache (ie. delete folders “~/.gradle/cache”, “app/build” and rebuild everything). I thought deleting the entire cache would cause a really long build time but it was only a few minutes longer.

Not exactly sure why this worked but the problem has not reappeared.

Read more comments on GitHub >

github_iconTop Results From Across the Web

6 Ways To Fix Android Emulator App Keeps Crashing/Stopping
How To Fix Android Emulator App Keeps Crashing/Stopping? · Way 1: Check for Enough Disk Space · Way 2: Unsupported Version Of Mac...
Read more >
Android Emulator Device crash when start in Android Studio ...
For emulator crashing seconds after launch in Android Studio 2.3.1 or later: Open Android Virtual Device Manager, select your AVD, select "Edit this...
Read more >
Troubleshoot known issues with Android Emulator
To avoid crashes and hangs due to lack of free disk space, the emulator checks for sufficient free disk space on startup and...
Read more >
How to fix the “Android emulator crashes when I take a ...
How to fix the “Android emulator crashes when I take a screenshot” bug · Step 1: Temporarily change Android Studio's update channel to...
Read more >
Emulator still crashing? : r/future_fight - Reddit
Since Hawkeye update, it's been crashing a lot more. Previously it would only crash if I played Odin or if it had been...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found