Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ScrollView horizontal={true} error #21840

Closed
3 tasks
yaoyingjiang opened this issue Oct 18, 2018 · 4 comments
Closed
3 tasks

ScrollView horizontal={true} error #21840

yaoyingjiang opened this issue Oct 18, 2018 · 4 comments
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@yaoyingjiang
Copy link

Environment

OS: macOS High Sierra 10.13.6
Node: 8.4.0
Yarn: 1.7.0
npm: 5.8.0
Watchman: 4.9.0
Xcode: Xcode 10.0 Build version 10A255
Android Studio: 3.1 AI-173.4720617

Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: 0.55.3 => 0.55.3

Description

Set the property horizontal = {true} in ScrollView to scroll view horizontally but report an error after running Invariant Violation: Invariant Violation: Invariant Violation: Invariant Violation: Native component for "Android Horizontal ScrollView" does not exist.

here is my code

image

Uploading image.png…

Reproducible Demo

Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using https://snack.expo.io/. Please follow the guidelines for providing a MCVE: https://stackoverflow.com/help/mcve

@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.57 and verify if the issue still exists.

The ":rewind:Old Version" label will be removed automatically once you edit your original post with the results of running react-native info on a project using the latest release.

@yaoyingjiang
Copy link
Author

看起来您使用的是旧版本的React Native。请更新到最新版本v0.57并验证问题是否仍然存在。

“⏪一旦您react-native info使用最新版本在项目上运行结果编辑原始帖子,旧版本“标签将自动删除。

But I can scroll horizontally on the same React Native version.
image

@Daffodil12
Copy link

It is working fine with react-native version 0.56.

 <ScrollView horizontal={true} contentContainerStyle={styles.contentContainer}>
<View style={{width:89, height:120, backgroundColor:'#6534ee'}}>
</View>
<View style={{width:89, height:120, backgroundColor:'#ffff'}}>
</View>
<View style={{width:89, height:120, backgroundColor:'#6435ee'}}>
</View>
      </ScrollView>

screenshot_1540826169

@react-native-bot
Copy link
Collaborator

I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while.

If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.

@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label Nov 13, 2018
@facebook facebook locked as resolved and limited conversation to collaborators Nov 13, 2019
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Nov 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants