Comments (3)
I had the same issue issue
Installing this version works for me "react-native-svg": "^13.14.0"
from react-native-svg.
This may help as it may be related - #2235 (comment)
from react-native-svg.
I faced the same issue on android the APK install crashes when i access a screen where i used import { LocalSvg } from 'react-native-svg/css';
(react-native-svg v14 with expo) so i downgraded to 13.14.1 & updated the import back to import { LocalSvg } from 'react-native-svg';
and it is working fine rn.
component where i used LocalSvg:
import { styled } from 'nativewind';
import React from 'react';
import { StyleProp, Text, View, ViewStyle } from 'react-native';
import { LocalSvg } from 'react-native-svg';
import { icons } from '@/shared/icons';
export type CustomIconProps = {
name: keyof typeof icons;
size?: number;
color?: string;
style?: StyleProp<ViewStyle>;
};
const CustomIcon = ({ name, size = 24, color = 'black', style }: CustomIconProps) => {
const icon = icons[name];
if (!icon) {
return (
<View style={style}>
<Text>{name} not found</Text>
</View>
);
}
return (
<LocalSvg
width={size}
height={size}
asset={icon}
fill={color}
style={style}
/>
);
}
from react-native-svg.
Related Issues (20)
- Failed parsing SvgCssUri for first time, after reopening app it appears HOT 1
- Xlinkhref only work on web does not work on ios and android (the color did not get inherited ) HOT 2
- React native web + vitest issue - Cannot use import statement outside a module HOT 5
- fetchText method error : TypeError: Cannot read property 'prototype' of undefined when trying to call svg from uri HOT 6
- HTML entities contained in an XML string are not decoded by the SvgXml component HOT 1
- Path not rendering correctly HOT 1
- How to center Text along a path?
- React Native SVG stroke-width bug on expo web. HOT 1
- SVG image not import in React native HOT 3
- ForeignObject works with panResponder? HOT 2
- Why is `err` exported?
- stroke-width default value must be 1
- Error "ViewPropTypes" undefined in svg.js file HOT 1
- defaultProps issue with React version 18.3 HOT 4
- Comments in SVG file results in "Text strings must be rendered within a <Text> component." HOT 1
- Svg is blur on react-native-windows
- [Android] SvgFromUri doesn't work RN 0.74, New Arch + bridgelessMode ON. Jest tests failed. Patch is provided HOT 6
- Build failed on react-native 0.74.0 & newArchEnabled HOT 1
- ERROR Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider, js engine: hermes
- Image gets tiled instead of centered.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-svg.