React native 链接到ble plx后无法生成react本机应用程序

React native 链接到ble plx后无法生成react本机应用程序,react-native,react-native-ble-plx,React Native,React Native Ble Plx,与react-native ble plx链接后,react-native运行android失败 Task :react-native-ble-plx:compileDebugJavaWithJavac FAILED 这是一个新创建的应用程序,带有react native init,除了min sdk外,没有任何更改。 已经尝试清理项目,将min sdk设置为18,尝试使用android studio构建以获得更具体的错误,但仍然无法理解问题来自何处 我得到的错误是: Deprecated G

与react-native ble plx链接后,react-native运行android失败

Task :react-native-ble-plx:compileDebugJavaWithJavac FAILED
这是一个新创建的应用程序,带有react native init,除了min sdk外,没有任何更改。 已经尝试清理项目,将min sdk设置为18,尝试使用android studio构建以获得更具体的错误,但仍然无法理解问题来自何处

我得到的错误是:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
12 actionable tasks: 2 executed, 10 up-to-date
warning: [options] source value 7 is obsolete and will be removed in a future release
warning: [options] target value 7 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
/Users/oriamd/Documents/MyDev/DudeWheresMyCar/node_modules/react-native-ble-plx/android/src/main/java/com/polidea/reactnativeble/converter/RxBleScanResultConverter.java:3: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
/Users/oriamd/Documents/MyDev/DudeWheresMyCar/node_modules/react-native-ble-plx/android/src/main/java/com/polidea/reactnativeble/wrapper/Characteristic.java:5: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
完整日志如下:

如果需要,可以提供更多信息。
谢谢

问题是我使用的是Android Studio预览版,还有AndroidX和更多不受支持的软件包

这个问题与此类似

正如@Kreator answer中提到的,它与一些未转换为AndroidX的包有关

要解决此问题,可以使用

我在问题中提到了同样的问题,这些步骤解决了这个问题,应用程序再次运行

  • 首先,使用androidstudio的重构工具来转换你的应用程序re:the
  • npm安装--保存dev-jetifier
  • npx-jetify
  • npx react原生运行android
    (您的应用程序应该正确编译并工作)
  • 调用
    npx-jetify
    在package.json的安装后目标中运行(每当依赖项更新时,您都必须再次执行jetify)