加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

react-native – 在任何根目录中找不到入口文件index.ios.js

发布时间:2020-12-15 09:34:24 所属栏目:百科 来源:网络整理
导读:我的本机版本:0.24.0 index.ios.js: require('./entry'); entry.js: AppRegistry.registerComponent('movieView',() = require('./pages/movie')); 我在页面目录中的所有业务文档.当我运行项目时,错误显示如下: 解决方法 index.ios.js 'use strict'; req
我的本机版本:0.24.0

index.ios.js:

require('./entry');

entry.js:

AppRegistry.registerComponent('movieView',() => require('./pages/movie'));

我在页面目录中的所有业务文档.当我运行项目时,错误显示如下:

enter image description here

解决方法

index.ios.js

'use strict';
  require('./entry');

entry.js:

import React,{AppRegistry,StyleSheet,Text,View } from 'react-native';

class movieView extends React.Component 
{

}

AppRegistry.registerComponent('movieView',() => movieView);

您的问题不明确,也许您得到的错误是因为您为文件路径提供的命名空间.希望它会有所帮助!

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读