react-native - 任务“:react-native-pjsip:compileReleaseJavaWithJavac”执行失败
问题描述
我正在尝试构建一个从 github 克隆的 react-native 项目。这是 github 项目。
之后npm install
。我试过了react-native run-android
,我得到了这个:
/var/www/html/test/sipsip/react-native-pjsip-app/node_modules/react-native-pjsip/android/src/main/java/com/carusto/ReactNativePjSip/PjSipModulePackage.java:12: error: PjSipModulePackage is not abstract and does not override abstract method createJSModules() in ReactPackage
public class PjSipModulePackage implements ReactPackage {
^
/var/www/html/test/sipsip/react-native-pjsip-app/node_modules/react-native-pjsip/android/src/main/java/com/carusto/ReactNativePjSip/PjActions.java:307: error: cannot find symbol
value.put(mapKey, map.getArray(mapKey).toArrayList());
^
symbol: method toArrayList()
location: interface ReadableArray
Note: Some input files use or override 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.
2 errors
:react-native-pjsip:compileReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-pjsip:compileReleaseJavaWithJavac'.
> 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: 24.355 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
我尝试了很多解决方案,但没有一个解决了我的问题。你知道如何解决这个问题吗?
附加信息:
react-native 版本:
react-native-cli: 2.0.1
react-native: 0.41.2
解决方案
删除 /ios 和 /android 文件夹
然后运行react-native eject
推荐阅读
- scala - 在 Spark 中按 RDD 的一列排序
- ruby-on-rails - Rspec before(:each) 有效,但 before(:all) 无效
- java - 码头服务器中的 jboss-deployment-structure.xml 等效项
- postgresql - 两组的 PostGIS 最小距离,包括两个表中的其他变量
- c - 在 C 编程中,需要的 L 值是语义错误还是语法错误?
- java - “java.lang.LinkageError:以前为具有名称的不同类型启动加载”的原因
- reactjs - take(eventChannel) 采取所有行动而不是发出的结果
- spring-boot - 春季云任务多个数据源的问题
- c++ - 用于存储通用 lambda 的通用 std::function
- python - Keras 模型编译错误:TypeError:“张量”类型的对象没有 len() model.compile