react-native中更改android/ios的入口文件
android
1.android /app/build.gradle
project.ext.react = [
entryFile: "index.android.js"
]
2.android/app/src/main/java/com/项目名/MainApplication.java
@Override
protected String getJSMainModuleName() {
return "index.android";
}
ios
ios/项目名/AppDelegate.m
jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index.ios" fallbackResource:nil];
本博客所记录的文章,主要是从网络收集的,有一些因为经过多次转载,所以出处已经不知,若是侵权,请通知我,我及时修改。本博客主要是用来记录我对所写文章的理解,若有错误,请大家指点,相互学习!