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.

Execution failed for task ':react-native-svg:compileReleaseJavaWithJavac'.

See original GitHub issue

I have the above error trying to build for android

react-native run-android
Scanning 795 folders for symlinks in /node_modules (6ms)
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Download https://jcenter.bintray.com/com/google/guava/guava/17.0/guava-17.0.jar
Incremental java compilation is an incubating feature.
[...]
/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/SvgView.java:123: error: method obtain in class TouchEvent cannot be applied to given types;
            TouchEvent.obtain(
                      ^
  required: int,TouchEventType,MotionEvent,long,float,float,TouchEventCoalescingKeyHelper
  found: int,TouchEventType,MotionEvent,float,float,TouchEventCoalescingKeyHelper
  reason: actual and formal argument lists differ in length
1 error
:react-native-svg:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-svg:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:15
  • Comments:5

github_iconTop GitHub Comments

2reactions
rodrigoolercommented, Jun 14, 2017

@cdoyle45 the same problem occurred to me and I did the following to temporarily resolve this problem.

Before:

"react-native-svg": "^5.1.8",

After:

"react-native-svg": "5.1.8",

Version 5.2.0 does not seem to be working properly and the above error occurs.

0reactions
jalalaghazadehcommented, Dec 9, 2018

updating my "react-native-svg" version to currently latest version 8.0.9 works for me! "dependencies": { ... "react-native-svg": "8.0.9", ... }

Read more comments on GitHub >

github_iconTop Results From Across the Web

Execution failed for task ':react-native-svg ... - GitHub
everything fine, but I'm getting build time error. Task :react-native-svg:compileDebugJavaWithJavac FAILED
Read more >
Execution failed for task ':app:compileDebugJavaWithJavac ...
This error occur because you RN version is different from Android's build.gradle version. When you create a react-native app probably it ...
Read more >
execution failed for task ':react-native-reanimated ... - You.com
What went wrong: Execution failed for task ':react-native-svg:compileReleaseJavaWithJavac'. > Compilation failed; see the compiler error output for details.
Read more >
strange error | Voters - AppGyver Community Edition
What went wrong: Execution failed for task ':react-native-webview:compileReleaseKotlin'. > Compilation error. See log for more details.
Read more >
Execution failed for task ':app:bundleReleaseJsAndAssets ...
jsx|.android.json|.native.json|.json)` [stderr]* `/home/expo/workingdir/build/environment/index(.native ...
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