react-native-video error

前端之家收集整理的这篇文章主要介绍了react-native-video error前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

react-native-video error

Users/holoto/WebstormProjects/demo/android/app/src/main/java/com/demo/MainActivity.java:4: error: cannot find symbol
import com.brentvatne.RCTVideo.ReactVideoPackage;
                              ^
  symbol:   class ReactVideoPackage
  location: package com.brentvatne.RCTVideo
/Users/holoto/WebstormProjects/demo/android/app/src/main/java/com/demo/MainActivity.java:46: error: cannot find symbol
            new ReactVideoPackage(),^
  symbol:   class ReactVideoPackage
  location: class MainActivity
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: 1 mins 17.722 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

code

Check “`
android/app/src/main/java/com/{你的rn项目名称}/MainActivity.java

 

import com.brentvatne.RCTVideo.ReactVideoPackage;

to

import com.brentvatne.react.ReactVideoPackage;
“`

参考

https://github.com/brentvatne/react-native-video/issues/217

原文链接:https://www.f2er.com/react/306644.html

猜你在找的React相关文章