Skip to content
This repository was archived by the owner on Apr 10, 2019. It is now read-only.
This repository was archived by the owner on Apr 10, 2019. It is now read-only.

React Native 0.19.0 Package Registration Error #26

@Traviskn

Description

@Traviskn

I'm on step 4 in the readme, registering the react package. Android studio is giving me error on these lines for passing in this to the ReactDatePackage:

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

Is there a new way to register packages like this?

The error is a bit cryptic, it says:

asList() cannot be applied to:
Expected Parameters: array: com.facebook.react.ReactPackage...
Actual Arguments: new MainReactPackage() (com.facebook.react.shell.MainReactPackage)
                  new ReactDatePackage(this) (me.nucleartux.date.ReactDatePackage)

And it only appears when I pass 'this' to the ReactDatePackage constructor

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions