Skip to content

Linking when using kotlin not possible? NativeModule.RCTAsyncStorage is null. #51

@rpuls

Description

@rpuls

You want to:

Since I was getting warnings that the react-native asyncStorags is becomming deprecated and is moved (here) to individual package, I decided to install... This seems to be a pain in the a** every time, was also troubleful when I installed RCs' extracted WebView. (grumpy sorry)....

Anyway, this time I am stuck with failing jest tests that I have not been able to resolve after 24 hours of trying. Have had multiple colleges passing by as well as asked for help on SO.
Please check this link for further issue despription: https://stackoverflow.com/questions/55418910/jest-test-fails-after-installing-react-native-async-storage

I did manual linking since react-native link will not work for this module as MainApplication.java does not exist when using kotlin. Instead I have MainApplication.kt

After linking manually the async functions are working just fine. Except the jest test are unable to find the module.
@RNCommunity/AsyncStorage: NativeModule.RCTAsyncStorage is null.

Any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions