Reputation: 12669
So I'm getting an error (at the bottom) that's most likely caused by me trying uninstalling react-native-pathjs-charts
. The problem below only exists on android and not on ios.
/Users/a.lau/Projects/react-native/First_App/android/app/src/main/java/com/first_app/MainApplication.java:7: error: cannot find symbol import com.horcrux.svg.RNSvgPackage; ^ symbol: class RNSvgPackage location: package com.horcrux.svg /Users/a.lau/Projects/react-native/First_App/android/app/src/main/java/com/first_app/MainApplication.java:29: error: cannot find symbol new RNSvgPackage() ^ symbol: class RNSvgPackage 2 errors :app:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 5.997 secs Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment: https://facebook.github.io/react-native/docs/android-setup.html
Upvotes: 0
Views: 2567
Reputation: 2536
Also have in mind that the package was changed from:
import com.horcrux.svg.RNSvgPackage;
to
import com.horcrux.svg.SvgPackage;
so you have to change from new RNSvgPackage()
to new SvgPackage()
hope it helps!
Upvotes: 3
Reputation: 11244
I guess you did not unlink before uninstalling the module. Install again, unlink and then uninstall the module.
npm install react-native-pathjs-charts --save
react-native unlink react-native-svg
npm remove react-native-pathjs-charts --save
Upvotes: 2