最初のページ、つまりログインページでソーシャルログインボタンを使用した反応ネイティブアプリケーションがあります.4以上のAndroidバージョンでアプリケーションを実行すると、Androidバージョンが4未満の場合に動作し、起動時にアプリがクラッシュします。 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", react-native --version
react-native-cli: 2.0.1 react-native: 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)