美文网首页
安卓android集成react-native时,闪退

安卓android集成react-native时,闪退

作者: YQSummer | 来源:发表于2020-08-20 14:48 被阅读0次

react-native > 0.63.2

安卓集成react-native时根据官网提供的文档配置后,跳转到rn页面时闪退,或者页面不出现,可以试试下面的方法:

下载第三方依赖

yarn add jsc-android

在android/build.gradle
allprojects{}里配置

        maven {
            // Android JSC is installed from npm
            url("$rootDir/../node_modules/jsc-android/dist")
        }

在app/build.gradle
dependencies{}里配置

 def useIntlJsc = false
  if (useIntlJsc) {
    implementation 'org.webkit:android-jsc-intl:+'
    } else {
    implementation 'org.webkit:android-jsc:+'
    }

相关文章

网友评论

      本文标题:安卓android集成react-native时,闪退

      本文链接:https://www.haomeiwen.com/subject/icgsjktx.html