首页 > 解决方案 > 安装 react-native-azurenotificationhub 后任务:react-native-auth0:compileDebugJavaWithJavac FAILED

问题描述

在我的 React Native 应用程序中,一切正常,直到我决定实施react-native-azurenotificationhub将我的应用程序连接到 Azure Notifications Hub。

我的应用程序使用 Auth0 进行用户身份验证,到目前为止,我没有遇到任何问题。

我正在使用所有软件包的最新版本,包括 React Native 0.63.1

我按照此处的说明安装 Azure Notifications Hub 包,这就是所有问题开始的时候https://github.com/CatalystCode/react-native-azurenotificationhub/blob/master/docs/android-installation.md

现在,我收到以下错误:

> Configure project :app
WARNING: API 'variant.getMergeResources()' is obsolete and has been replaced with 'variant.getMergeResourcesProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getMergeResources(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.

> Task :react-native-auth0:compileDebugJavaWithJavac FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
42 actionable tasks: 2 executed, 40 up-to-date
C:\Users\sam\source\repos\iQuest\Ingrid Mobile\Time\ingridtime\node_modules\react-native-auth0\android\src\main\java\com\auth0\react\A0Auth0Package.java:13: error: A0Auth0Package is not abstract and does not override abstract method createJSModules() in ReactPackage
public class A0Auth0Package implements ReactPackage {
       ^
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-auth0: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. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
C:\Users\sam\source\repos\iQuest\Ingrid Mobile\Time\ingridtime\node_modules\react-native-auth0\android\src\main\java\com\auth0\react\A0Auth0Package.java:13: error: A0Auth0Package is not abstract and does not override abstract method createJSModules() in ReactPackage

过去两天我一直在研究这个问题,答案到处都是,我几乎尝试了所有这些都无济于事。知道这里发生了什么吗?

标签: react-nativeauth0azure-notificationhub

解决方案


推荐阅读