ListView已从ReactNative中删除

时间:2019-08-20 07:01:18

标签: react-native

我刚刚安装了项目并在我的设备上运行了它,但是它显示了错误“ ListView已从ReactNative中删除”。我不明白为什么会这样,因为我没有在项目中使用列表视图。这是屏幕截图。

enter image description here

我认为此错误来自node_modules库。使用列表视图。

Package.json

const MAX_LENGTH: u64 = 256;
let mut stdin = std::io::stdin();
let mut input = String::new();
let mut bstdin = std::io::BufReader::new(stdin.take(MAX_LENGTH));
bstdin.read_line(&mut input).unwrap();

App.js

{
  "name": "demo_app",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "react-native start",
    "test": "jest"
  },
  "dependencies": {
    "native-base": "^2.8.1",
    "react": "16.8.6",
    "react-native": "0.60.5",
    "react-native-animatable": "^1.3.1",
    "react-native-exception-handler": "^2.10.2",
    "react-native-router-flux": "^4.0.6",
    "react-native-ui-kitten": "^3.1.2",
    "react-timer-mixin": "^0.13.4"
  },
  "devDependencies": {
    "@babel/core": "^7.5.0",
    "@babel/runtime": "^7.5.0",
    "@react-native-community/eslint-config": "^0.0.3",
    "babel-jest": "^24.1.0",
    "jest": "^24.1.0",
    "metro-react-native-babel-preset": "0.54.1",
    "react-test-renderer": "16.8.6"
  },
  "jest": {
    "preset": "react-native"
  }
}

SplashScreen.js

import React, { Component } from 'react';
import SplashScreen from "./src/components/main/SplashScreen";
import {
  BackHandler,
} from "react-native";
import { Root } from 'native-base';

import { Scene, Router, Actions } from 'react-native-router-flux';


export default class App extends Component {
  componentWillMount = () => {
    BackHandler.addEventListener('hardwareBackPress', () => Actions.pop());
  };

  render() {
    return (
      <Root>
        <Router>
          <Scene key="root">
            <Scene initial key="splash" component={SplashScreen} hideNavBar />

          </Scene>
        </Router>
      </Root>
    );
  }

}

1 个答案:

答案 0 :(得分:0)

它来自本机

reference

何时将其修复,这是基于本机的另一个问题;)