react-native 0.46升级0.51报错:Bundling `index.android.js` [development, non-minified] 0.0% (0/1), failed

如图:
0.46updateto0.51.png
解决:
1:android /app/build.gradle
添加如下:

project.ext.react = [
        entryFile: "index.js"
]

2:在MainApplication里面

 @Override
    protected String getJSMainModuleName() {
      return "index";
    }

3:修改index.ios.js&&index.android.ios->index.js
将这两个文件合并一个命名index.js.

参考:https://github.com/wuyunqiang/ReactNativeUtil/issues/33

猜你喜欢

转载自blog.csdn.net/u014041033/article/details/78970897
今日推荐