如何处理“ RNGestureHandlerRootViewManager.java”文件错误

时间:2019-01-24 08:52:18

标签: javascript java reactjs react-native

我正在尝试使用“ react-native run-android”在Android设备上安装我的应用,但是在安装“ react-native-gesture-handler”后,出现错误“ FAILURE:Build failed with an exception”,并且在node_modules文件夹的“ RNGestureHandlerModule.java”中出现15个错误。

我尝试了很多次链接手势处理程序。但是错误没有任何变化。

/projects/gitlabstyleseject/kono-app-styles/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.java:4: error: package com.facebook.react.module.annotations does not exist
import com.facebook.react.module.annotations.ReactModule;
                                            ^
/projects/gitlabstyleseject/kono-app-styles/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.java:17: error: cannot find symbol
@ReactModule(name = RNGestureHandlerRootViewManager.REACT_CLASS)
 ^
  symbol: class ReactModule

/projects/gitlabstyleseject/kono-app-styles/node_modules/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.java:16: 
error: package com.facebook.react.module.annotations does not exist
import com.facebook.react.module.annotations.ReactModule;
                                            ^


Task :react-native-gesture-handler:compileDebugJavaWithJavac FAILED
  uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    15 errors

请给我建议如何解决这些错误。我是新来的本地人。

0 个答案:

没有答案