Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android原生项目集成reactnative模块,当点击按钮跳转到reactnative页面报错,非常急,急,急如律令 java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~VRMqytafdeaHmCq0vdk2uw==/com.changan.caftbase-Jjr_e11nK5egu6uEG2Yepw==/lib/arm64/libfolly_runtime.so"... java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~VRMqytafdeaHmCq0vdk2uw==/com.changan.caftbase-Jjr_e11nK5egu6uEG2Yepw==/lib/arm64/libfolly_runtime.so"... #894

Open
xwj006 opened this issue Oct 24, 2024 · 1 comment

Comments

@xwj006
Copy link

xwj006 commented Oct 24, 2024

                                    android原生项目集成reactnative模块,当点击按钮跳转到reactnative页面报错                                                             java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__emutls_get_address" referenced by "/data/app/~~VRMqytafdeaHmCq0vdk2uw==/com.changan.caftbase-Jjr_e11nK5egu6uEG2Yepw==/lib/arm64/libfolly_runtime.so"...

ndk使用的26.3.11579264,
android {
namespace 'com.xxxxxxxx'
compileSdk 33

defaultConfig {
    applicationId "com.xxxxx.xxxxx" // 对应jush包名
    minSdk 24
    targetSdk 33
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    vectorDrawables {
        useSupportLibrary true
    }

    externalNativeBuild {
        cmake {
            cppFlags "-std=c++11 -frtti -fexceptions"
            arguments "-DANDROID_STL=c++_shared"
        }
    }
    // 配置jpush
    ndk {
        //选择要添加的对应 cpu 类型的 .so 库。
        abiFilters 'armeabi-v7a', 'arm64-v8a'
        // 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
    }

    manifestPlaceholders = [
            // 包名 请设置
            JPUSH_PKGNAME : "com.changan.caftbase",
            //JPush 上注册的包名对应的 Appkey.
            JPUSH_APPKEY : "你的 Appkey ",
            //暂时填写默认值即可.
            JPUSH_CHANNEL : "developer-default",

            //若不集成厂商通道,可直接跳过以下配置

// MEIZU_APPKEY : "MZ-魅族的APPKEY",
// MEIZU_APPID : "MZ-魅族的APPID",
// XIAOMI_APPID : "MI-小米的APPID",
// XIAOMI_APPKEY : "MI-小米的APPKEY",
// OPPO_APPKEY : "OP-oppo的APPKEY",
// OPPO_APPID : "OP-oppo的APPID",
// OPPO_APPSECRET : "OP-oppo的APPSECRET",
// VIVO_APPKEY : "vivo的APPKEY",
// VIVO_APPID : "vivo的APPID",
// HONOR_APPID : "Honor的APP ID",
]
// 配置jpush结束
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
}
}

// 指定 NDK 版本
ndkVersion '26.3.11579264'

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
//此处配置必须添加 否则无法正确运行
aaptOptions {
    additionalParameters '--auto-add-overlay'
    //noCompress 'foo', 'bar'
    ignoreAssetsPattern "!.svn:!.git:.*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~"
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_11
    targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
    jvmTarget = '1.8'
}
buildFeatures {
    compose true
}
composeOptions {
    kotlinCompilerExtensionVersion '1.3.2'
}

}

@sunnylqm
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants