相关疑难解决方法(0)

React-Native:模块AppRegistry不是注册的可调用模块

我目前正在尝试在Android模拟器上运行ES6 react-native-webpack-server.不同之处在于我升级了我package.jsonbuild.grade使用react 0.18.0,并且在启动时遇到此错误.据我所知AppRegistry,正确导入.即使我要注释掉代码,这个错误仍然会出现.这在iOS上没有问题.

我究竟做错了什么?

编辑:尝试其他支持0.18.0的样板后,我仍然遇到同样的问题.

在此输入图像描述

android webpack react-native

101
推荐指数
7
解决办法
11万
查看次数

React Native Module AppRegistry不是注册的可调用模块

我遇到了我们团队正在进行的共享github项目的问题.我一直在打击这个问题大约一个星期,现在没有任何运气.

问题是在我的团队计算机上运行的全新克隆,无法在我的计算机上正常运行.它抛出错误,"模块AppRegistry不是可调用模块".我正在开发一个ios项目.我删除了所有文件夹并重新开始.我创建了具有各种权限的新用户,但没有运气.

还有什么我想念的吗?谢谢!


Index.ios.js

const { AppRegistry } = require('react-native');
const setup = require('./app/setup');

AppRegistry.registerComponent('mobileapps', setup);
Run Code Online (Sandbox Code Playgroud)

Setup.js

import App from './index';
import React, { Component } from 'react';
import { Provider } from 'react-redux';
import configureStore from './store';

const store = configureStore();

function setup() {
  class Root extends Component {
    render() {
      return (
        <Provider store={store}>
          <App />
        </Provider>
      );
    }
  }

  return Root;
}

module.exports = setup;
Run Code Online (Sandbox Code Playgroud)

native reactjs

8
推荐指数
1
解决办法
8446
查看次数

TypeError: null 不是对象(正在评估 'TrackPlayer.RATING_HEART') &amp;&amp; Module AppRegistry 不是已注册的可调用模块

在过去 1.5 天左右的时间里,我试图让 React-native-track-player 工作,但我就是无法实现它。无论我尝试什么,我总是会遇到相同的错误块:

\n
ERROR  TypeError: null is not an object (evaluating \'TrackPlayer.RATING_HEART\')\nERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect. \n      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.\n
Run Code Online (Sandbox Code Playgroud)\n

我使用react-native expo和 “正常” react-native(根据react-native docu)设置它。对于我尝试过的所有变体:JSTS

\n
    \n
  • 删除/重新安装节点模块
  • \n …

android reactjs react-native react-native-track-player

2
推荐指数
1
解决办法
5005
查看次数

module appregistry不是注册的可调用模块(调用runApplication)

我根本找不到让反应导航工作的方法.我从互联网上复制了工作示例,但它们似乎也没有用.谁能告诉我我做错了什么.

我正在使用节点:8.9.4 react:16.3.0-alpha.1 react-native:0.54.0 react-navigation:^ 1.4.0

//index.js
import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';
import {
  TabNavigator,
  StackNavigator
} from 'react-navigation';

import Home from './first';
import Homes from './second';

export default class demoApp extends Component {
  render() {
    return (
      <SimpleNavigation/>
    );
  }
}

export const SimpleNavigation = StackNavigator({
  Home: { 
    screen: Home,
    header: { visible: false },
    navigationOptions: {
      title: 'Home',
      header: null
    },
  },
  Homes: { 
    screen: Homes,
    navigationOptions: …
Run Code Online (Sandbox Code Playgroud)

tabs reactjs react-native react-navigation

0
推荐指数
1
解决办法
7240
查看次数