Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native-svg doesn't work on android 11 and above #1680

Closed
PavithraPurushothaman-T2S opened this issue Dec 29, 2021 · 3 comments
Closed
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing repro This issue need minimum repro scenario

Comments

@PavithraPurushothaman-T2S
<Svg
       height={100}
       width="100%"
       viewBox={`0 0 ${screenWidth} ${100}`}>
        <Path 
                  d={'M884,0v58H0V0h403.2c1.8,19.9,18.5,35.5,38.8,35.5c20.4,0,37.1-15.6,38.8-35.5H884z'} 
                  fill={'green} 
                  stroke={'green} />
</Svg>

Bug

I am using the above code to show a svg image with respect to device width which is working fine with iOS but in Android, it's not working in Android version 11 and above.

Screenshot 2021-12-29 at 12 26 04

Something like this in the bottom of the screen

Environment info

    OS: macOS 11.6
    CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
    Memory: 111.32 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.16.1 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.24.0 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0
    Android SDK:
      API Levels: 23, 25, 27, 28, 29, 30
      Build Tools: 28.0.3, 29.0.2, 29.0.3
      System Images: android-27 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom
      Android NDK: Not Found
  IDEs:
    Android Studio: 2020.3 AI-203.7717.56.2031.7678000
    Xcode: 13.0/13A233 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_241 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.1 => 16.13.1 
    react-native: 0.63.4 => 0.63.4 
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found ```

Library version: v12.1.1
@staghouse
Copy link

Confirming Android 11 is not rendering SVG's but does on iOS - I am using SvgUri.

@juvenile-spec
Copy link

How can I solve this problem.

@bohdanprog bohdanprog added Missing repro This issue need minimum repro scenario Close when stale This issue is going to be closed when there is no activity for a while labels Jun 18, 2024
@bohdanprog
Copy link
Member

Hello @PavithraPurushothaman-T2S,
If you still have that problem, share a simple example of how to reproduce that issue.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Close when stale This issue is going to be closed when there is no activity for a while Missing repro This issue need minimum repro scenario
Projects
None yet
Development

No branches or pull requests

4 participants