-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
No ViewManager defined for class RNSVGGroup #135
Comments
Getting the same issue, but my output didn't throw any errors whatsoever.
But still getting a similar error This doesn't happen on iOS, only on the Android. This can be verified by simply starting a new React Native project from the react-native-cli, using these dependencies and versions:
|
It seems like you failed to link the native code
|
Nop. I did what you said, but I already knew the results, still the same thing. Remember, I did this to a new project. So I can replicate this by simply starting a new project from the cli and adding
|
If this helps (I am the OP), I also use Android (not iOS), so could it be an issue with Android? I hope this can be addressed soon as I cannot use the library at all. Thanks! (also, the error messages in "react-native link" could be due to my Windows environment?) |
maybe duplicated with #83 |
It doesn't seem to be the same issue, as the module is definitely been linked properly, couldn't it be an issue in |
@ezsper Do you use Windows? Because I also have this problem: facebook/react-native#9787 (which may be the reason for non-appropriate linking) But: even when I manually linked everything, I still get this error message and cannot continue development. I hope someone can help, thanks! |
No, I'm using Mac. |
@ezsper So, this is a general problem, it needs to be addressed as even with manual linking the error appears. |
Same problem here. Developing android in windows. |
Could you check the MainApplication.java file?
and add the RNSvgPackage to the getPackages method like this:
|
Now it works, thanks. But it's interesting because I've tried your suggestion in the past and I was getting a compilation error when running |
I'm closing this now. |
For people using react-native-svg>5.1.5 (I'm not quite sure when exactly the changes were made), note that import com.horcrux.svg.SvgPackage;
...
@Override
protected List<ReactPackage> getPackages() {
return Arrays.asList(
... other packages ...
new SvgPackage()
);
} |
Thanks, paulsoh. In my case there was no 'new SvgPackage()' or 'new RNSvgPackage()' at all, so I just added 'new SvgPackage()'. Now it works |
Thanks @paulsoh !! |
Delete AVD from Android Studio and re-install the lastest phone version, it worked for me 100%🌟 |
@YahyaNamir Thanks! I will try this. |
Tell me what u found when you finish! |
It's showing same error. Now I don't have any option except reset my Android studio. |
I get the following error (red)...
"No ViewManager defined for class RNSVGGroup"
...when running my RN Android app with the react-native-svg package:
"react-native link react-native-svg"
Not sure if the problem is related to the following issuse:
When I use this...
react-native link react-native-svg
...I get this:
It appears the the links have been completed though.
I am using Windows 10.
Any ideas why I get the above message? Thank you.
The text was updated successfully, but these errors were encountered: