我有一个react原生应用,它的Android部分在24小时前还运行得很好。现在,它不能在闪屏之后移动。我在android工作室里看到的唯一堆栈记录是-
08-31 18:52:48.897 25716-25716/? W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/com.techmagnates.edulil-2/split_lib_dependencies_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.techmagnates.edulil-2@split_lib_dependencies_apk.apk@classes.dex) because non-0 exit status
08-31 18:52:49.507 25716-25716/? W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/com.techmagnates.edulil-2/split_lib_slice_0_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.techmagnates.edulil-2@split_lib_slice_0_apk.apk@classes.dex) because non-0 exit status
08-31 18:52:49.547 25716-25716/? W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/com.techmagnates.edulil-2/split_lib_slice_1_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.techmagnates.edulil-2@split_lib_slice_1_apk.apk@classes.dex) because non-0 exit status
08-31 18:52:49.591 25716-25716/? W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/com.techmagnates.edulil-2/split_lib_slice_2_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.techmagnates.edulil-2@split_lib_slice_2_apk.apk@classes.dex) because non-0 exit status
08-31 18:52:49.643 25716-25716/? W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/com.techmagnates.edulil-2/split_lib_slice_3_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.techmagnates.edulil-2@split_lib_slice_3_apk.apk@classes.dex) because non-0 exit status
08-31 18:52:49.689 25716-25716/? W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/com.techmagnates.edulil-2/split_lib_slice_4_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.techmagnates.edulil-2@split_lib_slice_4_apk.apk@classes.dex) because non-0 exit status
08-31 18:52:49.744 25716-25716/? W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/com.techmagnates.edulil-2/split_lib_slice_5_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.techmagnates.edulil-2@split_lib_slice_5_apk.apk@classes.dex) because non-0 exit status
08-31 18:52:49.792 25716-25716/? W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/com.techmagnates.edulil-2/split_lib_slice_6_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.techmagnates.edulil-2@split_lib_slice_6_apk.apk@classes.dex) because non-0 exit status
08-31 18:52:49.845 25716-25716/com.techmagnates.edulil W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/com.techmagnates.edulil-2/split_lib_slice_7_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.techmagnates.edulil-2@split_lib_slice_7_apk.apk@classes.dex) because non-0 exit status
08-31 18:52:49.895 25716-25716/com.techmagnates.edulil W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/com.techmagnates.edulil-2/split_lib_slice_8_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.techmagnates.edulil-2@split_lib_slice_8_apk.apk@classes.dex) because non-0 exit status
08-31 18:52:49.962 25716-25716/com.techmagnates.edulil W/art: Failed execv(/system/bin/dex2oat --runtime-arg -classpath --runtime-arg --debuggable --instruction-set=arm --instruction-set-features=smp,div,atomic_ldrd_strd --runtime-arg -Xrelocate --boot-image=/system/framework/boot.art --runtime-arg -Xms64m --runtime-arg -Xmx512m --instruction-set-variant=krait --instruction-set-features=default --dex-file=/data/app/com.techmagnates.edulil-2/split_lib_slice_9_apk.apk --oat-file=/data/dalvik-cache/arm/data@app@com.techmagnates.edulil-2@split_lib_slice_9_apk.apk@classes.dex) because non-0 exit status
08-31 18:52:49.987 25716-25716/com.techmagnates.edulil I/InstantRun: starting instant run server: is main process
08-31 18:52:50.037 25716-25716/com.techmagnates.edulil E/com.facebook.internal.AttributionIdentifiers: getAttributionIdentifiers should not be called from the main thread这里可能会发生什么?
我的依赖项看起来像这样
dependencies {
compile project(':react-native-linear-gradient')
compile project(':react-native-vector-icons')
compile project(':react-native-keep-awake')
compile project(':react-native-video')
compile project(':react-native-iap')
compile project(':react-native-fast-image')
compile project(':react-native-fbsdk')
compile (project(':react-native-google-signin')) {
exclude group: "com.google.android.gms"
}
compile project(':react-native-static-server')
compile project(':react-native-fs')
compile project(':react-native-device-info')
compile project(':react-native-orientation')
compile project(':react-native-fetch-blob')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile project(':react-native-razorpay')
implementation 'com.google.android.gms:play-services-auth:15.0.1'
}发布于 2018-09-02 08:21:02
我们遇到了同样的问题,到目前为止,为了继续工作,我们所做的工作是取消fbsdk react-native unlink react-native-fbsdk的链接,并删除MainAplication.java和MainActivity.java上的所有引用。
我们不确定真正的问题或解决方案,但我们肯定是fbsdk造成了问题。
发布于 2018-09-08 03:26:40
遵循Mayank Baiswar answer,它对我起作用,我的android/app/build.gradle现在是这样的:
configurations.all { resolutionStrategy { force 'com.facebook.android:facebook-android-sdk:4.34.0' } }
dependencies {
compile project(':react-native-vector-icons')
compile project(':react-native-sentry')
compile project(':react-native-onesignal')
compile project(':react-native-image-picker')
compile project(':react-native-i18n')
compile project(':react-native-fbsdk')
compile project(':react-native-contacts')
compile project(':react-native-config')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:23.0.1"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation 'com.android.support:multidex:1.0.1'
} https://stackoverflow.com/questions/52116612
复制相似问题