question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not working on Android real device

See original GitHub issue

Do you know how to use react-narive-deck-swiper by Expo?

I tried to use it on Android but it doesn’t work (Not rendering).

However, it works on iOS in same code.

<Swiper
                    goBackToPreviousCardOnSwipeRight
                    disableRightSwipe={this.state.cardIndex === 0}
                    cards={finalData}
                    onSwipedLeft={ (cardIndex) => this.onSwiped(cardIndex, 'left')}
                    onSwipedRight={ (cardIndex) => this.onSwiped(cardIndex,'right')}
                    showSecondCard={false}
                    cardVerticalMargin={50}
                    renderCard={(card, index) => {
                        return (
                            <ScrollView contentContainerStyle={styles.card}>
                                <Text style={styles.text}>{card}</Text>
                                {
                                    index !== this.props.data.length
                                        ? <Text
                                            style={styles.pageNumber}>{`Page ${index + 1} / ${this.props.data.length}`}</Text>
                                        : null
                                }
                            </ScrollView>
                        )
                    }}
                    onSwipedAll={() => {
                        this.props.navigation.navigate('Rating', {level: this.props.level});                        
                    }}
                    backgroundColor={'transparent'}
                    stackSize={this.props.data.length}>
</Swiper>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

24reactions
JacobJaffecommented, Apr 21, 2019

I believe that the react-native-view-overflow dependency does break this on android – consistently getting an error:

requireNativeComponent: "RNViewOverflow" was not found in the UIManager

I believe this happens because on Expo the linking step can’t occur.

This was introduced in #222 – I didn’t have any issues until after that update.

@baophamtd did you get this working on a version beyond that pull request, on an Andorid, AND on Expo?

EDIT: By setting the ‘UseViewOverflow’ Prop false on Android, it’ll work on Expo 😃 Example:

import { Platform } from 'react-native'

...

<Swiper
  ...props
  useViewOverflow={Platform.OS === 'ios'}
/>
1reaction
mightymcommented, Jul 17, 2019

Is react-native-view-overflow somehow involved when the labels on the cards are shown? Because I just realize that there are no labels on the cards on android.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Studio doesn't see device - Stack Overflow
Open up your device manager, navigate to your android device, right click on it and select Update Driver Software then select Browse driver ......
Read more >
How to fix "Android Studio doesn't see device" in Android ...
How to fix “Android Studio doesn't see device” in Android Studio? · Install the USB driver for your Android device. · Enable USB...
Read more >
Fix an installed Android app that isn't working - Google Support
Try the following steps if an app installed on your phone has any of these problems: Crashing. Won't open. Won't respond. Isn't working...
Read more >
Run apps on a hardware device - Android Developers
Always test your Android app on a real device before releasing it to users. This page describes how to set up your development...
Read more >
Troubleshooting when Android Studio doesn't recognize your ...
Possible Solutions · 1) Make sure USB Debugging is enabled in your device · 2) Make sure you have installed the android sdk...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found