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:compileDebugJavaWithJavac'.

See original GitHub issue

Bug

I ran following comments for setup, npm i react-native-copilot npm i react-native-svg react-native link react-native-svg

everything fine, but I’m getting build time error.

Task :react-native-svg:compileDebugJavaWithJavac FAILED /Users/mahendran.m/workspace/ekart-stormtrooper/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/RenderableViewManager.java💯 error: cannot find symbol START, ^ symbol: variable START location: class RenderableViewManager.RenderableShadowNode /Users/mahendran.m/workspace/ekart-stormtrooper/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/RenderableViewManager.java:101: error: cannot find symbol END, ^ symbol: variable END location: class RenderableViewManager.RenderableShadowNode /Users/mahendran.m/workspace/ekart-stormtrooper/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/RenderableViewManager.java:119: error: cannot find symbol MARGIN_START, ^ symbol: variable MARGIN_START location: class RenderableViewManager.RenderableShadowNode /Users/mahendran.m/workspace/ekart-stormtrooper/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/RenderableViewManager.java:120: error: cannot find symbol MARGIN_END, ^ symbol: variable MARGIN_END location: class RenderableViewManager.RenderableShadowNode /Users/mahendran.m/workspace/ekart-stormtrooper/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/RenderableViewManager.java:130: error: cannot find symbol PADDING_START, ^ symbol: variable PADDING_START location: class RenderableViewManager.RenderableShadowNode /Users/mahendran.m/workspace/ekart-stormtrooper/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/RenderableViewManager.java:131: error: cannot find symbol PADDING_END, ^ symbol: variable PADDING_END location: class RenderableViewManager.RenderableShadowNode /Users/mahendran.m/workspace/ekart-stormtrooper/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/RenderableViewManager.java:134: error: cannot find symbol BORDER_START_WIDTH, ^ symbol: variable BORDER_START_WIDTH location: class RenderableViewManager.RenderableShadowNode /Users/mahendran.m/workspace/ekart-stormtrooper/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/RenderableViewManager.java:135: error: cannot find symbol BORDER_END_WIDTH, ^ symbol: variable BORDER_END_WIDTH location: class RenderableViewManager.RenderableShadowNode Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 8 errors

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:react-native-svg:compileDebugJavaWithJavac’.

Compilation failed; see the compiler error output for details.

Environment info

info React Native Environment Info: System: OS: macOS 10.14.5 CPU: (8) x64 Intel® Core™ i7-4770HQ CPU @ 2.20GHz Memory: 25.87 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 8.9.4 - ~/.nvm/versions/node/v8.9.4/bin/node Yarn: 1.12.3 - /usr/local/bin/yarn npm: 5.6.0 - ~/.nvm/versions/node/v8.9.4/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: Android SDK: API Levels: 23, 24, 25, 26, 27, 28 Build Tools: 23.0.1, 23.0.2, 25.0.0, 25.0.1, 25.0.2, 26.0.1, 26.0.2, 26.0.3, 27.0.3, 28.0.1, 28.0.3 System Images: android-23 | Intel x86 Atom_64, android-23 | Google APIs Intel x86 Atom_64, android-24 | Google APIs ARM 64 v8a, android-28 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom IDEs: Android Studio: 3.3 AI-182.5107.16.33.5314842 Xcode: /undefined - /usr/bin/xcodebuild npmPackages: react: ^16.8.6 => 16.8.6 react-native: 0.59.9 => 0.59.9 npmGlobalPackages: react-native-cli: 2.0.1

Library version: ^9.5.1

Steps To Reproduce

  1. npm i react-native-copilot
  2. npm i react-native-svg
  3. react-native link react-native-svg
  4. react-native run-android

Describe what you expected to happen:

  1. successful build

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15

github_iconTop GitHub Comments

4reactions
aristechcommented, Sep 1, 2019

this was my error …/node_modules/react-native-svg/android/src/main/java/com/horcrux/svg/PathParser.java:43: error: ‘;’ put a semicolon after break fixed it

4reactions
tholdercommented, Aug 30, 2019

Ok, I found it. It was a problem with my build.gradle. Obviously this is because I’m a) doing a big upgrade and b) don’t know what I’m doing!

diff --git a/android/build.gradle b/android/build.gradle
index 79f7a803..05d74d0a 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -34,9 +34,9 @@ wrapper {

 ext {
     minSdkVersion = 16
-    compileSdkVersion = 26
-    targetSdkVersion = 26
-    supportLibVersion = "26.1.0"
+    compileSdkVersion = 28
+    targetSdkVersion = 28
+    supportLibVersion = "28.0.0"
 }

 subprojects {
@@ -45,7 +45,7 @@ subprojects {
         resolutionStrategy.eachDependency { details ->
             if (details.requested.group == 'com.android.support'
                 && !details.requested.name.contains('multidex') ) {
-                details.useVersion "26.1.0"
+                details.useVersion "28.0.0"
             }
         }
     }
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 >
task :react-native-svg:compiledebugjavawithjavac failed - You.com ...
What went wrong: Execution failed for task ':react-native-svg:compileDebugJavaWithJavac'. Compilation failed; see the compiler error output for details.
Read more >
react-native-art-svg - Bountysource
What went wrong: Execution failed for task ':react-native-svg:compileDebugJavaWithJavac'. > Could not find tools.jar. Please check that /Library/Internet ...
Read more >
Android studio | Execution failed for task - YouTube
Here, given trick to solve this type of error. Execution failed for task ':app:checkDebugAarMetadata'. Could not resolve all files for ...
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