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-svg android compatibility #26

Closed
gitpayal opened this issue Sep 25, 2017 · 4 comments
Closed

react-svg android compatibility #26

gitpayal opened this issue Sep 25, 2017 · 4 comments

Comments

@gitpayal
Copy link

When I build react-svg for android , it throws error. Do we have any alternative for android? Please help My code is below

import ReactSVG from 'react-svg';

@tanem
Copy link
Owner

tanem commented Sep 26, 2017

Looks like your code sample is incomplete, can you paste the rest please? What exactly is the error that you are seeing, can you attach some details of that too?

@gitpayal
Copy link
Author

Thanks Tanem for the reply. Following are my app specifications :->
"react": "^15.4.1",
"react-native": "^0.42.3",
"react-svg": "^2.1.21"

I am using the below code for showing sag images as icon in my app 👍

import ReactSVG from 'react-svg';

This code works in safari iOS but gives error in android(v 7.0) application while building app.
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:mergeDebugResources'.

/home/payalverma/Projects/caro-mobile/android/app/src/main/res/drawable-mdpi/public_img_svgs_settings.svg: Error: The file name must end with .xml or .png

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 24.182 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

let me know if you can help me with the same

@tanem
Copy link
Owner

tanem commented Sep 27, 2017

Thanks for the info @gitpayal. As you said re building the app, this looks like an issue with your setup, but it's not something I'm familiar with.

At this stage it doesn't look like a ReactSVG issue to me, but running a quick google search throws up a few links that might help, for example this one on stack overflow.

I'll leave this issue open for now though in case you want to let me know how you got on, good luck 🍀

@tanem
Copy link
Owner

tanem commented Oct 2, 2017

Closing this issue as it doesn't look related to this project.

@tanem tanem closed this as completed Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants