troZee / react-native-svg-view

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

requireNativeComponent: "SvgView" was not found in the UIManager

KonstntinM opened this issue · comments

Hello everyone,

first of all thank you for developing the package.
While experimenting with the package, I ran into a bug that I can't explain. When I include the package exactly as in the example, I get the following error: "requireNativeComponent: "SvgView" was not found in the UIManager."

error message

Error screen on the test device

code

My code looks like this.

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

import SvgView from 'react-native-svg-view'

export default function NavigationBar() {
  return (
    <View style={styles.container}>
      <SvgView source="https://www.dropbox.com/s/d1dbdvo4l7xry4w/downdogflip.svg?raw=1" style={{ height: 24, width: 24 }}/>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    width: 375,
    height: 80,
    bottom: 0,
    display: 'flex',
    flexDirection: 'row',
    alignItems: 'center',
  },
});

test environment

  • iPhone 7 with IOS 13.5.1
  • Expo Go Version 2.18.4
  • Expo Version ~40.0.0
  • Package Version ^12.1.0

Have any of you had the same problem? I would be glad to get some feedback.

Hey 👋
Thank you for reporting an issue. What version of lib you are using ? The latest is https://www.npmjs.com/package/react-native-svg-view/v/0.1.6

I checked example in the project and everything works fine

Simulator Screen Shot - iPhone 11 - 2021-01-29 at 15 19 58

I also created a fresh project and everything works fine. Maybe it is related to expo ?

How about an android ?
You can also try to go to ios folder and run pod install

Okay, I just tested my project on an Android device as well and got the same error message. I am also using the latest package version (0.1.6) and have reinstalled all packages using expo installer.

I would now also assume that this is a problem with expo.

Thanks a lot!