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

no viewmanager defined for RN SVG Circle #272

Closed
rizki82 opened this issue Mar 3, 2017 · 2 comments
Closed

no viewmanager defined for RN SVG Circle #272

rizki82 opened this issue Mar 3, 2017 · 2 comments

Comments

@rizki82
Copy link

rizki82 commented Mar 3, 2017

i have followed the steps from #83 and #148 but i still got the same error, here my dependencies:
"react": "15.4.2",
"react-native": "0.41.2",
"react-native-svg": "^5.1.5"

@magicismight
Copy link
Collaborator

package com.svgexample;

import android.app.Application;

import com.facebook.react.ReactApplication;
import com.horcrux.svg.SvgPackage;
import com.facebook.react.ReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;
import com.facebook.soloader.SoLoader;

import java.util.Arrays;
import java.util.List;

public class MainApplication extends Application implements ReactApplication {

  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
    @Override
    public boolean getUseDeveloperSupport() {
      return BuildConfig.DEBUG;
    }

    @Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
            new SvgPackage()
      );
    }
  };

  @Override
  public ReactNativeHost getReactNativeHost() {
    return mReactNativeHost;
  }

  @Override
  public void onCreate() {
    super.onCreate();
    SoLoader.init(this, /* native exopackage */ false);
  }
}

@rizki82
Copy link
Author

rizki82 commented Mar 7, 2017

Thank you bro!

@rizki82 rizki82 closed this as completed Mar 7, 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