(Android) Trying to resolve view with tag which doesn't exist
See original GitHub issueI’m getting this issue if my view reference did not specify a backgroundColor.
so the code works fine if I take a Snapshot with the below viewRef
<View
style={{backgroundColor: 'yellow'}}
ref={ref => viewRefSuccess = ref}>
<Text>
Hello View Snap Shot
</Text>
</View>
However it will crash with the “Trying to resolve view with tag ‘tagID’ which doesn’t exist” if I remove the backgroundColor props.
<View ref={ref => viewRefSuccess = ref}>
<Text>
Hello View Snap Shot
</Text>
</View>
Any thought on why this is happening?
Thanks.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:14
- Comments:13 (5 by maintainers)
Top Results From Across the Web
How to make Expo.takeSnapshotAsync work on Android
This works fine on the iOS simulator but on Andriod, I get a red screen error: Trying to resolve view with tag 488...
Read more >Troubleshooting | React Navigation
Troubleshooting. This section attempts to outline issues that users frequently encounter when first getting accustomed to using React Navigation.
Read more >react-native-view-shot - npm
Start using react-native-view-shot in your project by running `npm i ... "Trying to resolve view with tag '{tagID}' which doesn't exist".
Read more >View - Android Developers
FOCUS_DOWN If the reference refers to a view that does not exist or is part of a hierarchy that is invisible, a RuntimeException...
Read more >View - React Native
pointerEvents ... Controls whether the View can be the target of touch events. ... Since pointerEvents does not affect layout/appearance, and we ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Probably related to the collapsable property for Android Views. Setting it to false could fix the problem.
Resolved by adding collapsable={false} to view
<View collapsable={false} style={{backgroundColor: 'yellow'}} ref={ref => viewRefSuccess = ref}> <Text> Hello View Snap Shot </Text> </View>