gpt4 book ai didi

android - 启动应用程序时 react native android 错误

转载 作者:行者123 更新时间:2023-12-05 05:31:33 26 4
gpt4 key购买 nike

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/buld.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
}
}
}

rn 问题:https://github.com/facebook/react-native/issues/35210

关于android - 启动应用程序时 react native android 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74336482/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com