Skip to content
This repository has been 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 opened this issue May 4, 2017 · 2 comments
Closed

Comments

@piemonkey
Copy link

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.

@marzolfb
Copy link
Contributor

marzolfb commented May 4, 2017

Thanks @piemonkey - this is very timely.

I have finally figured out how to work around text rotation behavior changes in react-native-svg that kept me from upgrading to the latest version of that library. This has been problematic for many of the issues logged here for a long time.

So, I will work on upgrading to the latest version of react, react-native and react-native-svg dependencies and incorporating your info here.

@marzolfb
Copy link
Contributor

marzolfb commented May 7, 2017

Should be fixed now with the update to the latest version of the major dependencies in #149.

@marzolfb marzolfb closed this as completed May 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants