這個是我一個前端前輩幫我弄的,自己解決的時候不行,她去官網找了相關的問題,然后發給我的,
react-native android 的release安裝包運行閃退,但是debug運行正常
環境:0.63.3
安卓集成react-native時根據官網提供的檔案配置后,跳轉到rn頁面時閃退,或者頁面不出現,可以試試下面的方法:
1、下載第三方依賴:
yarn add jsc-android
2、在android/build.gradle 檔案allprojects{}里配置
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
3、在app/build.gradle檔案dependencies{}里配置
def useIntlJsc = false
if (useIntlJsc) {
implementation 'org.webkit:android-jsc-intl:+'
} else {
implementation 'org.webkit:android-jsc:+'
}
再次進行打包即可
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/286406.html
標籤:其他
