Skip to content
This repository was archived by the owner on Sep 17, 2021. It is now read-only.
This repository was archived by the owner on Sep 17, 2021. It is now read-only.

Compilation error with RN 0.44 (incorrect arguments to TouchEvent.obtain) #147

Closed
@piemonkey

Description

@piemonkey

With RN 0.44.0 the TouchEvent.obtain method signature has been changed to add a new argument, which causes compilation of the version of react-native-svg used. This has been fixed in the latest version (5.1.8).

This is easy to reproduce by generating a brand new RN project with react-native init, installing react-native-pathjs-charts and attempting to compile for Android.

A temporary but dirty workaround is to modify node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/RNSVGSvgView.java to add the following (TouchEvent.obtain is on line 125):

            TouchEvent.obtain(
                mTargetTag,
                type,
                ev,
+               ev.getEventTime(),
                ev.getX(),
                ev.getY(),
                mTouchEventCoalescingKeyHelper));

Alternatively you could pull the logic for setting mGestureStartTime from the 5.1.8 version of the SvgView.java` file.

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