question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Throw a error in Android

See original GitHub issue

Error:

No ViewManager defined for class RNSVGCircle
get
    ViewManagerRegistry.java:35
createShadowNode
    UIImplementation.java:81
createView
    UIImplementation.java:151
createView
    UIManagerModule.java:205
invoke
    Method.java:-2
invoke
    BaseJavaModule.java:319
invoke
    JavaModuleWrapper.java:139
run
    NativeRunnable.java:-2
handleCallback
    Handler.java:739
dispatchMessage
    Handler.java:95
dispatchMessage
    MessageQueueThreadHandler.java:31
loop
    Looper.java:148
run
    MessageQueueThreadImpl.java:196
run
    Thread.java:818

IOS & Android: image

Package: “react”: “^15.3.1”, “react-native”: “^0.32.0”, “react-native-svg”: “^4.2.0”

My component:

import React, {Component} from 'react'
import {
  View,
  Text
} from 'react-native'
import Svg, {
  Circle
} from 'react-native-svg'


class CountdownCircle extends Component {
  render () {
    return (
      <View>
        <Svg
          height="100"
          width="100"
          >
          <Circle
            cx="50%"
            cy="50%"
            r="40%"
            fill="pink"
          />
        </Svg>
      </View>
    )
  }
}

export default CountdownCircle

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8

github_iconTop GitHub Comments

4reactions
magicismightcommented, Aug 26, 2016

In MainApplication.java add the following import:

import com.horcrux.svg.RNSvgPackage;

and add RNSvgPackage to the getPackages method like this:

@Override
protected List<ReactPackage> getPackages() {
    return Arrays.asList(
        ... other packages ...
        new RNSvgPackage()
    );
}
1reaction
magicismightcommented, Aug 26, 2016

try

react-native link react-native-svg

or see #83

Read more comments on GitHub >

github_iconTop Results From Across the Web

Throw custom Exceptions in Java/Android - Stack Overflow
Show activity on this post. In Java, when you throw a checked Exception , there is one more thing you are required to...
Read more >
Part 1: how exceptions work for JVM and Android apps
Throwing an exception means that the execution flow changes, and 'Hello World' is never printed. Instead, the program counter will jump to the ......
Read more >
Error Handling in Android Studio - TechJumping
A closer look at error and exception handling in Java using Android Studio. ... Note that "throw" can also be used on the...
Read more >
Exception - Android Developers
Base64DataException, This exception is thrown by Base64InputStream or Base64OutputStream when an error is detected in the data being decoded.
Read more >
How to Throw Exceptions in Java - Rollbar
Throwing an exception is as simple as using the "throw" statement. You then specify the Exception object you wish to throw. Every Exception ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found