Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invariant Violation: requireNtiveComponent: "RNSVGRect" was not found in the UIManager #11

Open
nxhoang opened this issue Feb 10, 2020 · 2 comments

Comments

@nxhoang
Copy link

nxhoang commented Feb 10, 2020

I ran 2 cmd lines:
yarn add react-native-chart-kit
yarn add react-native-svg prop-types
then show me an error
image
I tried to run this
react-native link react-native-svg
then show me another error

info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

Configure project :react-native-audio
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html

Task :react-native-svg:compileDebugJavaWithJavac
G:\Works\Phuong\MES.SCAN\node_modules\react-native-svg\android\src\main\java\com\horcrux\svg\SvgView.java:24: error: cannot find symbol
import androidx.annotation.NonNull;
^
symbol: class NonNull
location: package androidx.annotation
G:\Works\Phuong\MES.SCAN\node_modules\react-native-svg\android\src\main\java\com\horcrux\svg\ForeignObjectView.java:17: error: cannot find symbol
import androidx.annotation.NonNull;
^
symbol: class NonNull
location: package androidx.annotation
G:\Works\Phuong\MES.SCAN\node_modules\react-native-svg\android\src\main\java\com\horcrux\svg\SvgView.java:113: error: cannot find symbol
public void onDescendantInvalidated(@nonnull View child, @nonnull View target) {
^
symbol: class NonNull
location: class SvgView
G:\Works\Phuong\MES.SCAN\node_modules\react-native-svg\android\src\main\java\com\horcrux\svg\SvgView.java:113: error: cannot find symbol
public void onDescendantInvalidated(@nonnull View child, @nonnull View target) {
^
symbol: class NonNull
location: class SvgView
G:\Works\Phuong\MES.SCAN\node_modules\react-native-svg\android\src\main\java\com\horcrux\svg\ForeignObjectView.java:47: error: cannot find symbol
public void onDescendantInvalidated(@nonnull View child, @nonnull View target) {
^
symbol: class NonNull
location: class ForeignObjectView
G:\Works\Phuong\MES.SCAN\node_modules\react-native-svg\android\src\main\java\com\horcrux\svg\ForeignObjectView.java:47: error: cannot find symbol
public void onDescendantInvalidated(@nonnull View child, @nonnull View target) {
^
symbol: class NonNull
location: class ForeignObjectView
6 errors

Task :react-native-svg:compileDebugJavaWithJavac FAILED

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.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 54s
118 actionable tasks: 11 executed, 107 up-to-date
error 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/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.

@ThalKod
Copy link

ThalKod commented May 10, 2022

Was you able to fix this issue @nxhoang ?

1 similar comment
@felipermfalcao
Copy link

Was you able to fix this issue @nxhoang ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants