首页 > 解决方案 > 一种 Signal 设置与当前的 firebase 依赖项不匹配

问题描述

我尝试准备我的颤振应用程序以使用一个信号插件,但是当按照一个信号本身定义的步骤进行操作时,出现许多与依赖版本相关的错误我升级它们但问题仍然存在并且我不清楚


FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> In project 'android' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[1
  0.2.1, 16.0.99]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

  Dependency failing: com.onesignal:OneSignal:3.15.6 -> com.google.android.gms:play-services-location@[10.2.1, 16.0.99], b
  ut play-services-location version was 17.1.0.

  The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art
  ifact with the issue.
  -- Project 'android' depends on project 'geolocator' which depends onto com.google.android.gms:play-services-location@16
  .0.0
  -- Project 'android' depends on project 'app' which depends onto com.onesignal:OneSignal@[3.15.6, 3.99.99]
  -- Project 'android' depends on project 'app' which depends onto com.onesignal:OneSignal@{strictly 3.15.6}
  -- Project 'android' depends on project 'onesignal_flutter' which depends onto com.onesignal:OneSignal@3.15.6
  -- Project 'android' depends on project 'app' which depends onto com.google.android.gms:play-services-location@17.1.0
  -- Project 'android' depends on project 'app' which depends onto com.google.android.gms:play-services-location@{strictly
   17.1.0}
  -- Project 'android' depends on project 'location' which depends onto com.google.android.gms:play-services-location@16.+

  For extended debugging info execute Gradle from the command line with ./gradlew --info :android:assembleDebug to see the
   dependency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at http
  s://github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = true }" to you
  r build.gradle file.

* 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. ```

标签: flutterdartpluginsonesignal

解决方案


可能是因为您的项目与此版本的库不匹配而出现此问题,

尝试使用这种方式(默认版本)

onesignal_flutter: 

不是这样

onesignal_flutter: ^2.6.2

推荐阅读