Execution failed for task ':react-native-svg:compileReleaseJavaWithJavac'.
See original GitHub issueI 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:
- Created 6 years ago
- Reactions:15
- Comments:5
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@cdoyle45 the same problem occurred to me and I did the following to temporarily resolve this problem.
Before:
After:
Version 5.2.0 does not seem to be working properly and the above error occurs.
updating my
"react-native-svg"
version to currently latest version8.0.9
works for me!"dependencies": { ... "react-native-svg": "8.0.9", ... }