Skip to content
New issue

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

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

Already on GitHub? # to your account

ReactNative从0.47 升级到0.56遇到的问题 #1

Open
CodingPapi opened this issue Jul 9, 2018 · 2 comments
Open

ReactNative从0.47 升级到0.56遇到的问题 #1

CodingPapi opened this issue Jul 9, 2018 · 2 comments

Comments

@CodingPapi
Copy link
Owner

CodingPapi commented Jul 9, 2018

Gradle

babel

第三方依赖问题

  • Unable to resolve module react-native/Libraries/StyleSheet/normalizeColor from /home/supermario/Nodejs/test/fromScrach/Sinopec/node_modules/antd-mobile-rn/lib/segmented-control/segmented.android.js: Module react-native/Libraries/StyleSheet/normalizeColor does not exist in the Haste module map

    antd-mobile-rn 库使用了react-native弃用迁移的变量。最新版本的antd库就有问题,没法升级,我们会只有一个weldNew页面用到了SegmentedControl控件,可以考虑替换该控件。

运行时崩溃

  • react-native 的 自带Image控件

    运行时崩溃。未找到原因。自此卡住
    7.9号 灵感一现,继续
    resizeMode={Image.resizeMode.cover} 替换为 resizeMode="cover"

  • NavigationActions.reset undefined

    NavigationActions库版升级导致的不兼容, reset 方法被移到新的StackActions中了

资源重复问题

  • init一个新项目,一点一点把代码和依赖加进去,替换react.gardle,重新build,资源重复的问题消失了
  • 看到旧项目中冲突的资源是drawable文件夹中以src开头的一些图片,推测是之前版本编译自动生成。全部删除
  • 删除所有drawable-开头的资源文件夹,保留mipmap-开头的文件夹

遗留问题

  • 由于antd-mobile-rn库在0.56中崩溃,weldNew中,需要替换掉SegmentedControl控件
@tanranran
Copy link

一个人开发两端的话,还真是忙不过来啊

@1c7
Copy link

1c7 commented Aug 12, 2018

赞。
(用 RN 开发省下来的时间,都用来 debug RN 带来的问题了)(哈哈哈)

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

No branches or pull requests

3 participants