Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

react-native: Get error, invariant violation: View config not found of RNSVGCircle

$
0
0

Ok so basically Im importing many libraries to a project all at once, and trying them out one by one. Right now Im trying to make SVG work (Google Sign In and Gesture Handler work accordingly), but after running this code:

**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React, { useState } from 'react';
import {
  SafeAreaView,
  StyleSheet,
  ScrollView,
  View,
  StatusBar,
  Text,
} from 'react-native';

import Svg, { Circle } from 'react-native-svg';

import {
  TapGestureHandler,
  LongPressGestureHandler,
  State
} from 'react-native-gesture-handler'

import OneSignal from 'react-native-onesignal'

import {
  GoogleSignin,
  GoogleSigninButton,
  statusCodes,
} from '@react-native-community/google-signin';
//aa

import RNlocalize from 'react-native-localize'

import YouTube from 'react-native-youtube';

//import Share from 'react-native-share';

const App: () => React$Node = () => {

  const [text, setText] = useState('Yass')

  const _handleStateChange = ({ nativeEvent }) => {
    if (nativeEvent.state === State.ACTIVE) {
      setText('Long Press')
    }
    if (nativeEvent.state === State.END) {
      setText('Back to Yass')
    }
  }

  return (
    <View>
      <View style={{ padding: 80 }}>
        <GoogleSigninButton //a
          style={{ width: 192, height: 48 }}
          size={GoogleSigninButton.Size.Wide}
          color={GoogleSigninButton.Color.Dark}
        />
        <Text>HOLAaApessssnesdsdA</Text>
        <LongPressGestureHandler onHandlerStateChange={_handleStateChange}>
          <Text style={styles.buttonText}>Longpress me</Text>
        </LongPressGestureHandler>
        <Text>{text}</Text>
      </View>
      <View>
        <Svg height="100" width="100">
          <Circle cx="50" cy="50" r="50" fill="pink" />
        </Svg>
      </View>
    </View>

  );//a
};

const styles = StyleSheet.create({

  buttonText: {
    borderWidth: 1,
  }
});

export default App;

The following error jumps

ExceptionsManager.js:44 Invariant Violation: requireNativeComponent: "RNSVGCircle" was not found in the UIManager.

This error is located at:
    in RNSVGCircle (at Circle.tsx:24)
    in Circle (at App.js:71)
    in RNSVGGroup (at G.tsx:28)
    in G (at Svg.tsx:170)
    in RNSVGSvgView (at Svg.tsx:157)
    in Svg (at App.js:70)
    in RCTView (at App.js:69)
    in RCTView (at App.js:56)
    in App (at renderApplication.js:40)
    in RCTView (at AppContainer.js:101)
    in RCTView (at AppContainer.js:119)
    in AppContainer (at renderApplication.js:39)

Tried readding the library to the project, reinstalling and even manually adding the RNSVG podspec to my podfile. Im out of ideas right now.

ps: Im new on React Native and could be just a big dumb mistake on my part, so bear with me and thanks in advance


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>