I go to build > clean project, then build > build project, "react-native run-android" from root of react native project, metro terminal spins up, I click the green arrow 'run app' button on android studio, the app pops up loading on the emulator, then exits to emulator home screen, and this error is in the run tab log. Relatively new to react native, can't find anything that gives me a solution. Not sure what's happening or where to go from here. Any help is much appreciated
01/21 20:30:53: Launching 'app' on Nexus 5X API 29 x86.
$ adb shell am start -n "com.mysampleapp/com.mysampleapp.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Waiting for process to come online...
Connected to process 15533 on device 'emulator-5554'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
D/SoLoader: init start
adding system library source: /vendor/lib
D/SoLoader: adding system library source: /system/lib
D/SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.mysampleapp-91pUgz3FulEOy0UDuAiTAw==/lib/x86 flags = 0]
D/SoLoader: adding backup source from : com.facebook.soloader.ApkSoSource[root = /data/data/com.mysampleapp/lib-main flags = 1]
Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /system/lib flags = 2]
D/SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /vendor/lib flags = 2]
Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.mysampleapp-91pUgz3FulEOy0UDuAiTAw==/lib/x86 flags = 0]
Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.mysampleapp/lib-main flags = 1]
V/fb-UnpackingSoSource: locked dso store /data/user/0/com.mysampleapp/lib-main
V/fb-UnpackingSoSource: deps mismatch on deps store: regenerating
so store dirty: regenerating
D/ApkSoSource: not allowing consideration of lib/x86/libc++_shared.so: deferring to libdir
D/ApkSoSource: not allowing consideration of lib/x86/libfb.so: deferring to libdir
not allowing consideration of lib/x86/libfolly_futures.so: deferring to libdir
not allowing consideration of lib/x86/libfolly_json.so: deferring to libdir
not allowing consideration of lib/x86/libglog.so: deferring to libdir
not allowing consideration of lib/x86/libglog_init.so: deferring to libdir
not allowing consideration of lib/x86/libhermes-executor-debug.so: deferring to libdir
not allowing consideration of lib/x86/libhermes-executor-release.so: deferring to libdir
not allowing consideration of lib/x86/libhermes-inspector.so: deferring to libdir
not allowing consideration of lib/x86/libimagepipeline.so: deferring to libdir
D/ApkSoSource: not allowing consideration of lib/x86/libjscexecutor.so: deferring to libdir
not allowing consideration of lib/x86/libjsijniprofiler.so: deferring to libdir
not allowing consideration of lib/x86/libjsinspector.so: deferring to libdir
not allowing consideration of lib/x86/libnative-filters.so: deferring to libdir
not allowing consideration of lib/x86/libnative-imagetranscoder.so: deferring to libdir
not allowing consideration of lib/x86/libreactnativeblob.so: deferring to libdir
not allowing consideration of lib/x86/libreactnativejni.so: deferring to libdir
not allowing consideration of lib/x86/libyoga.so: deferring to libdir
V/fb-UnpackingSoSource: regenerating DSO store com.facebook.soloader.ApkSoSource
Finished regenerating DSO store com.facebook.soloader.ApkSoSource
V/fb-UnpackingSoSource: starting syncer worker
V/fb-UnpackingSoSource: releasing dso store lock for /data/user/0/com.mysampleapp/lib-main (from syncer thread)
not releasing dso store lock for /data/user/0/com.mysampleapp/lib-main (syncer thread started)
D/SoLoader: init finish: 4 SO sources prepared
init exiting
W/RenderThread: type=1400 audit(0.0:62): avc: denied { write } for name="property_service" dev="tmpfs" ino=36 scontext=u:r:untrusted_app_27:s0:c133,c256,c512,c768 tcontext=u:object_r:property_socket:s0 tclass=sock_file permissive=0 app=com.mysampleapp
D/libEGL: Emulator has host GPU support, qemu.gles is set to 1.
W/libc: Unable to set property "qemu.gles" to "1": connection failed; errno=13 (Permission denied)
D/libEGL: loaded /vendor/lib/egl/libEGL_emulation.so
D/libEGL: loaded /vendor/lib/egl/libGLESv1_CM_emulation.so
D/libEGL: loaded /vendor/lib/egl/libGLESv2_emulation.so
D/SoLoader: About to load: libjscexecutor.so
D/SoLoader: libjscexecutor.so not found on /data/data/com.mysampleapp/lib-main
libjscexecutor.so found on /data/app/com.mysampleapp-91pUgz3FulEOy0UDuAiTAw==/lib/x86
Not resolving dependencies for libjscexecutor.so
E/SoLoader: couldn't find DSO to load: libjscexecutor.so caused by: dlopen failed: library "libjsc.so" not found
D/ReactNative: ReactInstanceManager.ctor()
D/SoLoader: init exiting
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
W/com.mysampleap: Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (greylist,core-platform-api, reflection, allowed)
Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (greylist,core-platform-api, reflection, allowed)
Accessing hidden method Ldalvik/system/CloseGuard;->warnIfOpen()V (greylist,core-platform-api, reflection, allowed)
D/ReactNative: ReactInstanceManager.createReactContextInBackground()
ReactInstanceManager.recreateReactContextInBackgroundInner()
W/com.mysampleap: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed)
W/com.mysampleap: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed)
W/unknown:ReactNative: Packager connection already open, nooping.
D/HostConnection: HostConnection::get() New Host Connection established 0xd1f22080, tid 15586
D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0
W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
D/EGL_emulation: eglCreateContext: 0xdd4e35c0: maj 3 min 0 rcv 3
D/EGL_emulation: eglMakeCurrent: 0xdd4e35c0: ver 3 0 (tinfo 0xd1f68300)
W/Gralloc3: mapper 3.x is not supported
D/HostConnection: createUnique: call
HostConnection::get() New Host Connection established 0xd1f23660, tid 15586
D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV420_888_to_NV21 ANDROID_EMU_YUV_Cache GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_gles_max_version_3_0
D/eglCodecCommon: allocate: Ask for block of size 0x1000
D/eglCodecCommon: allocate: ioctl allocate returned offset 0x3ffff4000 size 0x2000
D/EGL_emulation: eglMakeCurrent: 0xdd4e35c0: ver 3 0 (tinfo 0xd1f68300)
D/EGL_emulation: eglMakeCurrent: 0xdd4e35c0: ver 3 0 (tinfo 0xd1f68300)
D/EGL_emulation: eglMakeCurrent: 0xdd4e35c0: ver 3 0 (tinfo 0xd1f68300)
D/ReactNative: ReactInstanceManager.onJSBundleLoadedFromServer()
D/ReactNative: ReactInstanceManager.recreateReactContextInBackground()
ReactInstanceManager.runCreateReactContextOnNewThread()
D/SoLoader: About to load: libhermes.so
D/SoLoader: libhermes.so not found on /data/data/com.mysampleapp/lib-main
libhermes.so not found on /data/app/com.mysampleapp-91pUgz3FulEOy0UDuAiTAw==/lib/x86
libhermes.so not found on /vendor/lib
libhermes.so not found on /system/lib
E/SoLoader: couldn't find DSO to load: libhermes.so
E/AndroidRuntime: FATAL EXCEPTION: create_react_context
Process: com.mysampleapp, PID: 15533
java.lang.UnsatisfiedLinkError: couldn't find DSO to load: libhermes.so
at com.facebook.soloader.SoLoader.doLoadLibraryBySoName(SoLoader.java:738)
at com.facebook.soloader.SoLoader.loadLibraryBySoName(SoLoader.java:591)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:529)
at com.facebook.soloader.SoLoader.loadLibrary(SoLoader.java:484)
at com.facebook.hermes.reactexecutor.HermesExecutor.<clinit>(HermesExecutor.java:20)
at com.facebook.hermes.reactexecutor.HermesExecutorFactory.create(HermesExecutorFactory.java:27)
at com.facebook.react.ReactInstanceManager$5.run(ReactInstanceManager.java:952)
at java.lang.Thread.run(Thread.java:919)
I/Process: Sending signal. PID: 15533 SIG: 9
Process 15533 terminated.
And here is my build.gradle:
apply plugin: "com.android.application"
import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js",
enableHermes: false
]
apply from: "../../node_modules/react-native/react.gradle"
/**
* Set this to true to create two separate APKs instead of one:
* - An APK that only works on ARM devices
* - An APK that only works on x86 devices
* The advantage is the size of the APK is reduced by about 4MB.
* Upload all the APKs to the Play Store and people will download
* the correct one based on the CPU architecture of their device.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
android {
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.mysampleapp"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
buildTypes {
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
implementation project(':react-native-gesture-handler')
implementation project(':react-native-vector-icons')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'androidx.annotation:annotation:1.1.0'
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}