将react-native升级到0.59.3后,Android上的Navigation.startTabBasedApp给出错误

时间:2019-04-03 13:08:31

标签: android react-native gradle build wix-react-native-navigation

我最近将我的React本机版本升级到0.59.3,现在在Navigation.startTabBasedApp()处出现错误:

控制台错误:启动应用程序时出错:主机功能异常 (请参见屏幕截图)

i之前的反应本机版本为0.55.4,而反应本机导航版本为:1.1.458

该代码在ios上可以正常工作,但仍然可以完美地工作,但是升级后在android上抛出错误。

升级到RNN v2是唯一的解决方案吗? 反应原生v 0.59.3不支持RNN v1吗? 有什么建议吗?

尝试安装不同版本的react-native-navigation v1。 代码更改

Code from .ts File :
this.SummaryData = [
            {
                "columnName": "Total FCT",
                "propertyType": "Impact",
                "own_PT": 100,
                "own_NPT": 101,
                "own_Total": 201,
                "compititor": [
                    {
                        "comp_PT": 100,
                        "comp_NPT": 101,
                        "comp_Total": 201,
                        "channelName": "Channel 1"
                    },
                    {
                        "comp_PT": 100,
                        "comp_NPT": 101,
                        "comp_Total": 201,
                        "channelName": "Channel 2"
                    },
                    {
                        "comp_PT": 100,
                        "comp_NPT": 101,
                        "comp_Total": 201,
                        "channelName": "Channel 3"
                    }

                ]
            }, {
                "columnName": "Total FCT",
                "propertyType": "Regular",
                "own_PT": 985,
                "own_NPT": 2340,
                "own_Total": 3325,
                "compititor": [
                    {
                        "comp_PT": 100,
                        "comp_NPT": 101,
                        "comp_Total": 201,
                        "channelName": "Channel 1"
                    },
                    {
                        "comp_PT": 100,
                        "comp_NPT": 101,
                        "comp_Total": 201,
                        "channelName": "Channel 2"
                    },
                    {
                        "comp_PT": 100,
                        "comp_NPT": 101,
                        "comp_Total": 201,
                        "channelName": "Channel 3"
                    }

                ]
            }
,
            {
                "columnName": "Total GRP",
                "propertyType": "Impact",
                "own_PT": 0,
                "own_NPT": 0,
                "own_Total": 0,
                "compititor": [
                    {
                        "comp_PT": 100,
                        "comp_NPT": 101,
                        "comp_Total": 201,
                        "channelName": "Channel 1"
                    },
                    {
                        "comp_PT": 100,
                        "comp_NPT": 101,
                        "comp_Total": 201,
                        "channelName": "Channel 2"
                    },
                    {
                        "comp_PT": 100,
                        "comp_NPT": 101,
                        "comp_Total": 201,
                        "channelName": "Channel 3"
                    }

                ]
            }, {
                "columnName": "Total GRP",
                "propertyType": "Regular",
                "own_PT": 51.17,
                "own_NPT": 94.01,
                "own_Total": 145.18,
                "compititor": [
                    {
                        "comp_PT": 6969.47,
                        "comp_NPT": 7979.12,
                        "comp_Total": 14948.58,
                        "channelName": "Channel 1"
                    },
                    {
                        "comp_PT": 6969.47,
                        "comp_NPT": 7979.12,
                        "comp_Total": 14948.58,
                        "channelName": "Channel 2"
                    },
                    {
                        "comp_PT": 6969.47,
                        "comp_NPT": 7979.12,
                        "comp_Total": 14948.58,
                        "channelName": "Channel 3"
                    }

                ]
            }


];

由于它可以在ios上使用,因此在android enter image description here

上应该能获得相同的结果

1 个答案:

答案 0 :(得分:0)

请将react-native-navigation更新为1.1.484或1.1.486。另外,您可以尝试从头开始在RN 0.59.3上创建一个新项目,在其中添加react-native-navigation并检查其是否有效。