Skip to content

react-native:安装react-native扩展包时报错 Invariant Violation: requireNativeComponent: #9

@timi-black

Description

@timi-black

安装 @react-native-community/slider

重载后报错

Invariant Violation: requireNativeComponent: "RNCSlider" was not found in the UIManager.

This error is located at:
    in RNCSlider
    in ForwardRef
    in RCTView
    in p
    in RCTView
    in l
    in v
    in RCTView
    in RCTView
    in c

exports
    AppEntry.bundle?platform=ios&dev=false&minify=true&hot=false:170:1627
get
    ...
    [native code]:0

image

解决方式

react-native link @react-native-community/slider

cd ios

pod install

react-native run-ios

提示

react-native-webview 也同理

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions