Skip to content

Android Build Error: Unresolved reference 'currentActivity' in RN 0.81.0 with new arch enabled #1002

@LuuNguyen0811

Description

@LuuNguyen0811

Feature request

After upgrading our React-Native version to 0.81.0 android build fails with error:
Function invocation 'getCurrentActivity()' expected.

Why it is needed

For background, React Native deprecated that currentActivity property in 0.80, and removed it in 0.81 (pretty quick turnaround)

Possible implementation

change currentActivity to get from reactApplicationContext.currentActivity

I create a PR for it

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