Android本机Thirdpary库在react-native上崩溃

时间:2019-07-20 12:31:26

标签: android react-native sdk

我正在使用android打印机sdk,它在本机android项目上工作正常,但是当我使用react-native尝试时,尝试使用任何sdk函数时应用程序崩溃。出现以下错误

E/linker: library "/system/lib/libsystem_util.so" ("/system
/lib/libsystem_util.so") needed or dlopened by "/system
/lib/libnativeloader.so" is not accessible for the namespace: 
[name="classloader-namespace", ld_library_paths="", 
default_library_paths="/data/app/com.telporn-1/lib/arm:/data/app
/com.telporn-1/base.apk!/lib/armeabi-v7a:/data/app/com.telporn-
1/split_lib_dependencies_apk.apk!/lib/armeabi-v7a:/data/app/com.telporn-
1/split_lib_slice_0_apk.apk!/lib/armeabi-v7a:/data/app/com.telporn-
1/split_lib_slice_1_apk.apk!/lib/armeabi-v7a:/data/app/com.telporn-
1/split_lib_slice_2_apk.apk!/lib/armeabi-v7a:/data/app/com.telporn-
1/split_lib_slice_3_apk.apk!/lib/armeabi-v7a:/data/app/com.telporn-
1/split_lib_slice_4_apk.apk!/lib/armeabi-v7a:/data/app/com.telporn-
1/split_lib_slice_5_apk.apk!/lib/armeabi-v7a:/data/app/com.telporn-
1/split_lib_slice_6_apk.apk!/lib/armeabi-v7a:/data/app/com.telporn-
1/split_lib_slice_7_apk.apk!/lib/armeabi-v7a:/data/app/com.telporn-
1/split_lib_slice_8_apk.apk!/lib/armeabi-v7a:/data/app/com.telporn-1/s 

这是我的构建包

{
android {
    splits {
        abi {
            reset()
            enable false
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
        }
    }

    packagingOptions {
        pickFirst '**/armeabi-v7a/libc++_shared.so'
        pickFirst '**/x86/libc++_shared.so'
        pickFirst '**/arm64-v8a/libc++_shared.so'
        pickFirst '**/x86_64/libc++_shared.so'
        pickFirst '**/x86/libjsc.so'
        pickFirst '**/armeabi-v7a/libjsc.so'
    }
}
dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.facebook.react:react-native:+"  // From node_modules

    if (enableHermes) {
      def hermesPath = "../../node_modules/hermesvm/android/";
      debugImplementation files(hermesPath + "hermes-debug.aar")
      releaseImplementation files(hermesPath + "hermes-release.aar")
    } else {
      implementation jscFlavor
    }
    implementation files('libs/telpo_api.jar')
}
}

0 个答案:

没有答案