question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error (and solution) to bug in RNSVGSvgView.java: "method obtain in class TouchEvent cannot be applied to given types".

See original GitHub issue
react-native-svg/Example/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/RNSVGSvgView.java:183: 
  error: method obtain in class TouchEvent cannot be applied to given types;
            TouchEvent.obtain(
                      ^
  required: int,long,TouchEventType,MotionEvent,float,float
  found: int,long,TouchEventType,MotionEvent,float,float,TouchEventCoalescingKeyHelper
  reason: actual and formal argument lists differ in length

I’ve fixed it by removing the last parameter mTouchEventCoalescingKeyHelper everywhere the obtain method is used in RNSVGSvgView. But I do not know if this is a reasonable fix. I did it so that I could compile the example on Android.

Thoughts?

edit: also these were my full steps to reproduce from checkout:

git clone https://github.com/magicismight/react-native-svg
cd react-native-svg/Example
npm install
cd android
gradle wrapper
cd ..
react-native run-android

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
heroiccommented, Jun 9, 2017

Getting this same error with react-native-svg@4.6.1 and react-native@0.44.2

1reaction
cogmetacommented, Jun 10, 2017

I am also getting error with react-native-svg@4.6.1 and react-native@0.44.2

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error (and solution) to bug in RNSVGSvgView.java: "method ...
Error (and solution) to bug in RNSVGSvgView.java: "method obtain in class TouchEvent cannot be applied to given types". #72.
Read more >
method in class cannot be applied to given types
I get this error for the lines of code that I call the methods generateNumbers() and displayCounts() in the main method. public class...
Read more >
Error: cannot be applied to given types - YouTube
This error occurs when you try to call a method using the wrong number or wrong order of parameters. Error : cannot be...
Read more >
TouchEvent (GWT Javadoc)
Runtime check for whether touch scrolling is supported in this browser. Methods inherited from class com.google.gwt.event.dom.client.HumanInputEvent.
Read more >
2021年08月_weixin_39655085的博客_CSDN博客
Error (and solution) to bug in RNSVGSvgView.java: "method obtain in class TouchEvent cannot be applied to given types". 2021-01-12 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found