Rapsssito / react-native-tcp-socket

React Native TCP socket API for Android, iOS & macOS with SSL/TLS support.
MIT License
315 stars 80 forks source link

> Task :react-native-tcp-socket:compileDebugJavaWithJavac FAILED #59

Closed housan-eng closed 4 years ago

housan-eng commented 4 years ago

Task :react-native-tcp-socket:compileDebugJavaWithJavac FAILED 195 actionable tasks: 10 executed, 185 up-to-date /../../../node_modules/react-native-tcp-socket/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketModule.java:74: 错误: 找不到符号 new GuardedAsyncTask<Void, Void>(mReactContext.getExceptionHandler()) { ^ 符号: 方法 getExceptionHandler() 位置: 类型为ReactApplicationContext的变量 mReactContext /../../../node_modules/react-native-tcp-socket/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketModule.java:102: 错误: 找不到符号 new GuardedAsyncTask<Void, Void>(mReactContext.getExceptionHandler()) { ^ 符号: 方法 getExceptionHandler() 位置: 类型为ReactApplicationContext的变量 mReactContext /../../../react-native-tcp-socket/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketModule.java:128: 错误: 找不到符号 new GuardedAsyncTask<Void, Void>(mReactContext.getExceptionHandler()) { ^ 符号: 方法 getExceptionHandler() 位置: 类型为ReactApplicationContext的变量 mReactContext /../../../node_modules/react-native-tcp-socket/android/src/main/java/com/asterinet/react/tcpsocket/TcpSocketModule.java:151: 错误: 找不到符号 new GuardedAsyncTask<Void, Void>(mReactContext.getExceptionHandler()) { ^ 符号: 方法 getExceptionHandler() 位置: 类型为ReactApplicationContext的变量 mReactContext 注: 某些输入文件使用了未经检查或不安全的操作。 注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。 4 个错误

FAILURE: Build failed with an exception.

The above problem, how do I solve it, please help and give pointers, thank you !

housan-eng commented 4 years ago

"react-native": "0.60.5",

Rapsssito commented 4 years ago

@houzhanshan, The issue is related to your RN version. The library uses methods only available in RN >= 0.61.

I have released 1.2.2, compatible with RN 0.60. Check if everything works. Check the README for more details.

Duplicate of #4