Error com.horcrux.svg does not exist on Windows/Android
See original GitHub issueHi,
I’m trying to install the react-native-svg package but I have not been able to do it yet.
I followed the instructions in the Readme (npm install and link code), but I have the following error when I execute react-native run-android
C:\rnative-projects\memoshape\android\app\src\main\java\com\memoshape\MainApplication.java:7: error: package com.horcrux.svg does not exist
import com.horcrux.svg.RNSvgPackage;
^
C:\rnative-projects\memoshape\android\app\src\main\java\com\memoshape\MainApplication.java:29: error: cannot find symbol
new RNSvgPackage()
^
symbol: class RNSvgPackage
2 errors
:app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I´m developing with Windows 10.
and…
"dependencies": {
"react": "15.4.1",
"react-native": "0.39.2",
"react-native-svg": "^4.4.1"
}
Thank you for your help!
Edit:
Same problem with
"dependencies": {
"react": "15.4.0",
"react-native": "0.38",
"react-native-svg": "4.4.0"
}
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:16
Top Results From Across the Web
Error com.horcrux.svg does not exist on Windows/Android #211
Hi, I'm trying to install the react-native-svg package but I have not been able to do it yet. I followed the instructions in...
Read more >React-native: RNSvgPackage() error - Stack Overflow
React-native: RNSvgPackage() error So I'm getting an error (at the bottom) that's most likely caused by me trying uninstalling react-native- ...
Read more >react-native-svg - npm
react-native-svg provides SVG support to React Native on iOS, Android, macOS, Windows, and a compatibility layer for the web.
Read more >com.horcrux.svg.SvgView.java Source code - Java2s.com
This source code is licensed under the MIT-style license found in the * LICENSE file in the root directory of this source tree....
Read more >How to import SVG files in React Native using react-native-svg
In this tutorial, we won't focus on the SVG itself. ... This is because there isn't a built-in React Native component that can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@joncursi try:
import com.horcrux.svg.SvgPackage;
and
I found the problem, the installer was not adding the depedence in build.gradle, to fix the problem I added the compile code inside dependences{}, I also excluded the appcompat-v7 to avoid conflicts: