V/SoLoader: libimagepipeline.so not found on /data/data/com.learnapp/lib-main
D/SoLoader: libimagepipeline.so found on /data/app/com.learnapp-liVxYGD3IHkNE51rFYNd0g==/lib/x86
Not resolving dependencies for libimagepipeline.so
D/EGL_emulation: eglMakeCurrent: 0xa9905ea0: ver 3 0 (tinfo 0xa99037b0)
I/zygote: Background concurrent copying GC freed 59540(4MB) AllocSpace objects, 3(68KB) LOS objects, 49% free, 3MB/7MB, paused 1.490ms total 153.153ms
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.learnapp, PID: 7966
java.lang.NullPointerException: Attempt to invoke interface method 'boolean com.facebook.react.common.SurfaceDelegate.isShowing()' on a null object reference
at com.facebook.react.devsupport.DevSupportManagerBase$5.run(DevSupportManagerBase.java:301)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
在启动 Android 模拟器的 React Native 应用程序时遇到此问题。不过它在 ios 上运行得很好。
将其添加到 android/build.gradle 文件的 allprojects 区域中
def REACT_NATIVE_VERSION = new File(['node', '--print',"JSON.parse(require('fs').readFileSync(require.resolve('react-native/package.json'), 'utf-8')).version"].execute(null, rootDir).text.trim()) allprojects {
configurations.all {
resolutionStrategy {
// Remove this override in 0.65+, as a proper fix is included in react-native itself.
force "com.facebook.react:react-native:" + REACT_NATIVE_VERSION
}
}
}
问题:https://github.com/facebook/react-native/issues/35210 https://github.com/facebook/react-native/issues/35210
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)