失败任务':react-native-firebase:compileDebugJavaWithJavac'的话语移动执行

时间:2019-06-26 18:32:06

标签: react-native react-native-firebase discourse

在从他们的GitHub存储库获得的全新Discourse Mobile克隆中,运行“ react-native run-android”时遇到此错误。此应用程序似乎可以在IOS上正常运行,但在Android上存在此问题。

我已经尝试使用不同的版本,清除NPM缓存并重新安装所有依赖项。

这是整个堆栈跟踪

info JS server already running.
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...

> Configure project :@react-native-community_async-storage
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported



> Configure project :app
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported


registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)

> Configure project :react-native-device-info
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported


WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Configure project :react-native-fabric
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported


WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (26.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '26.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Configure project :react-native-firebase
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported


react-native-firebase: using React Native prebuilt binary from C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native\android

> Configure project :react-native-key-pair
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported


WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Configure project :react-native-orientation
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported


WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Configure project :react-native-vector-icons
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported



> Configure project :react-native-webview
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported


:react-native-webview:reactNativeAndroidRoot C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native\android

> Task :react-native-firebase:compileDebugJavaWithJavac FAILED
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\analytics\RNFirebaseAnalyticsPackage.java:3: error: package android.support.annotation does not exist
import android.support.annotation.RequiresPermission;
                                 ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:7: error: cannot find symbol
import android.support.v4.app.NotificationManagerCompat;
                             ^
  symbol:   class NotificationManagerCompat
  location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:8: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
                                 ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessagingService.java:5: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
                                 ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:15: error: cannot find symbol
import android.support.v4.app.NotificationCompat;
                             ^
  symbol:   class NotificationCompat
  location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:16: error: cannot find symbol
import android.support.v4.app.RemoteInput;
                             ^
  symbol:   class RemoteInput
  location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:407: error: package NotificationCompat does not exist
  private NotificationCompat.Action createAction(
                            ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:494: error: cannot find symbol
  private RemoteInput createRemoteInput(Bundle remoteInput) {
          ^
  symbol:   class RemoteInput
  location: class DisplayNotificationTask
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseBackgroundNotificationActionReceiver.java:8: error: cannot find symbol
import android.support.v4.app.RemoteInput;
                             ^
  symbol:   class RemoteInput
  location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:20: error: package android.support.annotation does not exist
import android.support.annotation.RequiresApi;
                                 ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:21: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
                                 ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:10: error: cannot find symbol
import android.support.v4.app.RemoteInput;
                             ^
  symbol:   class RemoteInput
  location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:11: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
                                 ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\ReactNativeFirebaseAppRegistrar.java:20: error: package android.support.annotation does not exist
import android.support.annotation.Keep;
                                 ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\ReactNativeFirebaseAppRegistrar.java:29: error: cannot find symbol
@Keep
 ^
  symbol: class Keep
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\storage\RNFirebaseStoragePackage.java:3: error: package android.support.annotation does not exist
import android.support.annotation.RequiresPermission;
                                 ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\analytics\RNFirebaseAnalyticsPackage.java:17: error: cannot find symbol
  @RequiresPermission(
   ^
  symbol:   class RequiresPermission
  location: class RNFirebaseAnalyticsPackage
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:370: error: cannot find symbol
  @RequiresApi(api = 26)
   ^
  symbol:   class RequiresApi
  location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:384: error: cannot find symbol
  @RequiresApi(api = 26)
   ^
  symbol:   class RequiresApi
  location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:398: error: cannot find symbol
  @RequiresApi(api = 26)
   ^
  symbol:   class RequiresApi
  location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:414: error: cannot find symbol
  @RequiresApi(api = 26)
   ^
  symbol:   class RequiresApi
  location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:457: error: cannot find symbol
  @RequiresApi(api = 26)
   ^
  symbol:   class RequiresApi
  location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\storage\RNFirebaseStoragePackage.java:17: error: cannot find symbol
  @RequiresPermission(
   ^
  symbol:   class RequiresPermission
  location: class RNFirebaseStoragePackage
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:36: error: cannot find symbol
    LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
    ^
  symbol:   class LocalBroadcastManager
  location: class RNFirebaseMessaging
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:36: error: cannot find symbol
    LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
                                                  ^
  symbol:   variable LocalBroadcastManager
  location: class RNFirebaseMessaging
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:90: error: cannot find symbol
    Boolean enabled = NotificationManagerCompat
                      ^
  symbol:   variable NotificationManagerCompat
  location: class RNFirebaseMessaging
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessagingService.java:26: error: cannot find symbol
    LocalBroadcastManager
    ^
  symbol:   variable LocalBroadcastManager
  location: class RNFirebaseMessagingService
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessagingService.java:41: error: cannot find symbol
      LocalBroadcastManager
      ^
  symbol:   variable LocalBroadcastManager
  location: class RNFirebaseMessagingService
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessagingService.java:51: error: cannot find symbol
        LocalBroadcastManager
        ^
  symbol:   variable LocalBroadcastManager
  location: class RNFirebaseMessagingService
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:81: error: package NotificationCompat does not exist
      NotificationCompat.Builder nb;
                        ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:84: error: package NotificationCompat does not exist
        nb = new NotificationCompat.Builder(context, channelId);
                                   ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:87: error: package NotificationCompat does not exist
        nb = new NotificationCompat.Builder(context);
                                   ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:130: error: package NotificationCompat does not exist
        NotificationCompat.BigPictureStyle bp = new NotificationCompat.BigPictureStyle();
                          ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:130: error: package NotificationCompat does not exist
        NotificationCompat.BigPictureStyle bp = new NotificationCompat.BigPictureStyle();
                                                                      ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:158: error: package NotificationCompat does not exist
        NotificationCompat.BigTextStyle bt = new NotificationCompat.BigTextStyle();
                          ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:158: error: package NotificationCompat does not exist
        NotificationCompat.BigTextStyle bt = new NotificationCompat.BigTextStyle();
                                                                   ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:361: error: package NotificationCompat does not exist
          NotificationCompat.Action action = createAction(context, a, intentClass, notification);
                            ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:424: error: package NotificationCompat.Action does not exist
    NotificationCompat.Action.Builder ab = new NotificationCompat.Action.Builder(
                             ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:424: error: package NotificationCompat.Action does not exist
    NotificationCompat.Action.Builder ab = new NotificationCompat.Action.Builder(
                                                                        ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:437: error: cannot find symbol
        RemoteInput remoteInput = createRemoteInput(ri);
        ^
  symbol:   class RemoteInput
  location: class DisplayNotificationTask
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:496: error: package RemoteInput does not exist
    RemoteInput.Builder rb = new RemoteInput.Builder(resultKey);
               ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:496: error: package RemoteInput does not exist
    RemoteInput.Builder rb = new RemoteInput.Builder(resultKey);
                                            ^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseBackgroundNotificationActionReceiver.java:62: error: cannot find symbol
      Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
                           ^
  symbol:   variable RemoteInput
  location: class RNFirebaseBackgroundNotificationActionReceiver
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:204: error: cannot find symbol
      LocalBroadcastManager
      ^
  symbol:   variable LocalBroadcastManager
  location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:54: error: cannot find symbol
    LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
    ^
  symbol:   class LocalBroadcastManager
  location: class RNFirebaseNotifications
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:54: error: cannot find symbol
    LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
                                                  ^
  symbol:   variable LocalBroadcastManager
  location: class RNFirebaseNotifications
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:308: error: cannot find symbol
    Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
                         ^
  symbol:   variable RemoteInput
  location: class RNFirebaseNotifications
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.
47 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-firebase: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

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.1.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 3s
72 actionable tasks: 1 executed, 71 up-to-date
error 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/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.

0 个答案:

没有答案