小编Dav*_*ori的帖子

重复的模块名称:react-native-vector-icons

当我在react-native项目中安装NativeBase和React-Native-Router-Flux时,我收到此错误:

Failed to build DependencyGraph: @providesModule naming collision:
  Duplicate module name: react-native-vector-icons
  Paths: /Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native/local-cli/core/__fixtures__/files/package.json collides with /Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native-router-flux/node_modules/react-native/local-cli/core/__fixtures__/files/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
Error: @providesModule naming collision:
  Duplicate module name: react-native-vector-icons
  Paths: /Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native/local-cli/core/__fixtures__/files/package.json collides with /Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native-router-flux/node_modules/react-native/local-cli/core/__fixtures__/files/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
    at HasteMap._updateHasteMap (/Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:159:13)
    at p.getName.then.name (/Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:134:31)
Run Code Online (Sandbox Code Playgroud)

react-native native-base react-native-router-flux

7
推荐指数
1
解决办法
2113
查看次数

反应本机android滚动视图不工作

我有一个反应本机组件,例如:

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

import Level from './Level';

class LevelList extends Component {
    render() {

        return (
            <ScrollView style={styles.scrollView} >
                <View style={styles.levelList}>
                    <Level />
                    <Level />
                    <Level />
                    <Level />
                    <Level />
                    <Level />
                </View>
            </ScrollView>
        )
    }
}

var styles = StyleSheet.create({
    scrollView: {
    backgroundColor: '#fff',
    flex: 1,
    },
    levelList: {
        marginTop: 50,
        flexDirection:'column',
        alignItems: 'center',
    },

})

export default LevelList;
Run Code Online (Sandbox Code Playgroud)

<Level>只是一个保存文本的组件。

<LevelList>我的容器中有这样的: …

react-native react-native-scrollview

5
推荐指数
1
解决办法
3909
查看次数

iPad 标签栏 React 导航

我只在 iPad mini 2 中遇到问题,我的应用程序的标签栏是通过反应导航(图标+标签)在行而不是列中生成的。在其他设备 iPhone 和 iPad Pro、Android 中,我在列中看到图标和标签。您知道可能导致此问题的任何问题吗

reactjs react-native react-navigation

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