Android应用程序崩溃了Android版本4或更少的反应



我有一个反应本机应用程序,我在首页上使用了社交登录按钮,即在登录页面上,当我在Android版本中运行应用程序大于4时,则可以使用Android版本在启动本身时,应用程序崩溃了,我已经在OS版本中进行了测试:4.4.2、4.4.4和4.3它在上述所有版本中都崩溃了。我的登录按钮代码段。

<LoginButton
                        publishPermissions={["publish_actions"]}
                        onLoginFinished={
                        (error, result) => {
                        if (error) {
                        alert("login failed");
                        alert("login has error: " + result.error);
                        } else if (result.isCancelled) {
                        alert("login is cancelled.");
                        } else {
                         alert("success");
                         }
                         )
                        }
                        }
                        }
/>

我正在使用" react-native-fbsdk"的版本:"^0.4.0",反应 - version
反应新的-CLI:2.0.1反应:0.38.0

crashlytics的崩溃报告是

#0. Crashed: main: 0 0 0x0000000000000000
       at android.content.res.Resources.loadDrawable(Resources.java:2136)
       at android.content.res.Resources.getDrawable(Resources.java:715)
       at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:374)
       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:200)
       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
       at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:723)
       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193)
       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
       at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
       at com.facebook.login.widget.LoginButton.configureButton(LoginButton.java:586)
       at com.facebook.FacebookButtonBase.<init>(FacebookButtonBase.java:64)
       at com.facebook.login.widget.LoginButton.<init>(LoginButton.java:195)
       at com.facebook.reactnative.androidsdk.RCTLoginButton.<init>(RCTLoginButton.java:50)
       at com.facebook.reactnative.androidsdk.FBLoginButtonManager.createViewInstance(FBLoginButtonManager.java:56)
       at com.facebook.reactnative.androidsdk.FBLoginButtonManager.createViewInstance(FBLoginButtonManager.java:37)
       at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:46)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:218)
       at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:148)
       at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:890)
       at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:863)
       at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32)
       at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:131)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:759)
       at android.view.Choreographer.doCallbacks(Choreographer.java:574)
       at android.view.Choreographer.doFrame(Choreographer.java:543)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
       at android.os.Handler.handleCallback(Handler.java:733)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5118)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
       at dalvik.system.NativeStart.main(NativeStart.java)
--
Fatal Exception: android.content.res.Resources$NotFoundException: File res/drawable/abc_vector_test.xml from drawable resource ID #0x7f020052
       at android.content.res.Resources.loadDrawable(Resources.java:2136)
       at android.content.res.Resources.getDrawable(Resources.java:715)
       at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:374)
       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:200)
       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
       at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:723)
       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193)
       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
       at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
       at com.facebook.login.widget.LoginButton.configureButton(LoginButton.java:586)
       at com.facebook.FacebookButtonBase.<init>(FacebookButtonBase.java:64)
       at com.facebook.login.widget.LoginButton.<init>(LoginButton.java:195)
       at com.facebook.reactnative.androidsdk.RCTLoginButton.<init>(RCTLoginButton.java:50)
       at com.facebook.reactnative.androidsdk.FBLoginButtonManager.createViewInstance(FBLoginButtonManager.java:56)
       at com.facebook.reactnative.androidsdk.FBLoginButtonManager.createViewInstance(FBLoginButtonManager.java:37)
       at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:46)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:218)
       at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:148)
       at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:890)
       at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:863)
       at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32)
       at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:131)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:759)
       at android.view.Choreographer.doCallbacks(Choreographer.java:574)
       at android.view.Choreographer.doFrame(Choreographer.java:543)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
       at android.os.Handler.handleCallback(Handler.java:733)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5118)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
       at dalvik.system.NativeStart.main(NativeStart.java)
Caused by org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector
       at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:933)
       at android.graphics.drawable.Drawable.createFromXml(Drawable.java:877)
       at android.content.res.Resources.loadDrawable(Resources.java:2132)
       at android.content.res.Resources.getDrawable(Resources.java:715)
       at android.support.v4.content.ContextCompat.getDrawable(ContextCompat.java:374)
       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:200)
       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
       at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:723)
       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193)
       at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
       at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
       at com.facebook.login.widget.LoginButton.configureButton(LoginButton.java:586)
       at com.facebook.FacebookButtonBase.<init>(FacebookButtonBase.java:64)
       at com.facebook.login.widget.LoginButton.<init>(LoginButton.java:195)
       at com.facebook.reactnative.androidsdk.RCTLoginButton.<init>(RCTLoginButton.java:50)
       at com.facebook.reactnative.androidsdk.FBLoginButtonManager.createViewInstance(FBLoginButtonManager.java:56)
       at com.facebook.reactnative.androidsdk.FBLoginButtonManager.createViewInstance(FBLoginButtonManager.java:37)
       at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:46)
       at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:218)
       at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:148)
       at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:890)
       at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:863)
       at com.facebook.react.uimanager.GuardedChoreographerFrameCallback.doFrame(GuardedChoreographerFrameCallback.java:32)
       at com.facebook.react.uimanager.ReactChoreographer$ReactChoreographerDispatcher.doFrame(ReactChoreographer.java:131)
       at android.view.Choreographer$CallbackRecord.run(Choreographer.java:759)
       at android.view.Choreographer.doCallbacks(Choreographer.java:574)
       at android.view.Choreographer.doFrame(Choreographer.java:543)
       at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
       at android.os.Handler.handleCallback(Handler.java:733)
       at android.os.Handler.dispatchMessage(Handler.java:95)
       at android.os.Looper.loop(Looper.java:136)
       at android.app.ActivityThread.main(ActivityThread.java:5118)
       at java.lang.reflect.Method.invokeNative(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:515)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610)
       at dalvik.system.NativeStart.main(NativeStart.java)

由反应本机支持的最小版本为Android 4.1(API 16)

更多详细信息 - https://github.com/facebook/reaeact-native-native#reaeact-native----

相关内容

  • 没有找到相关文章

最新更新