Android 4.4.2上的React原生应用程序强制关闭

时间:2017-06-07 08:43:33

标签: android react-native

当我在Android 4.4.2上测试我的React Native应用程序时,我在这篇帖子的底部得到了堆栈跟踪。这是我的构建配置:

compileSdkVersion 23
    buildToolsVersion '25.0.3'

    defaultConfig {
        applicationId "... my app name ..."
        multiDexEnabled true
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 30000
        versionName "3.0.0"
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }

这是堆栈跟踪:

05-31 11:20:05.692  5789  5789 E AndroidRuntime: java.lang.NoClassDefFoundError: com.facebook.R$style
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at com.facebook.FacebookSdk.<clinit>(FacebookSdk.java:87)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at com.facebook.internal.FacebookInitProvider.onCreate(FacebookInitProvider.java:20)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at android.content.ContentProvider.attachInfo(ContentProvider.java:1591)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at android.content.ContentProvider.attachInfo(ContentProvider.java:1562)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at android.app.ActivityThread.installProvider(ActivityThread.java:5118)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at android.app.ActivityThread.installContentProviders(ActivityThread.java:4713)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4596)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at android.app.ActivityThread.access$1600(ActivityThread.java:169)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1340)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:146)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:5487)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at java.lang.reflect.Method.invokeNative(Native Method)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Method.java:515)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
05-31 11:20:05.692  5789  5789 E AndroidRuntime:    at dalvik.system.NativeStart.main(Native Method)

我已经尝试将com.android.support:multidex:1.0.0添加到我的gradle依赖项(此处提到:Why My android app crashes as soon as I open it in device 4.4.3 but not in device 5.0 or above),但这没有帮助。

0 个答案:

没有答案