当我将gradle依赖项添加到google标签管理器时,我得到了错误。
debugUnitTestCompileClasspath - Resolved configuration for compilation for variant: debugUnitTest
Dependency resolved to an incompatible version: Dependency(fromArtifactVersion=ArtifactVersion(groupId=com.google.firebase, artifactId=firebase-mess
aging, version=18.0.0), toArtifact=Artifact(groupId=com.google.firebase, artifactId=firebase-iid), toArtifactVersionString=[18.0.0])
> Task :app:dependencies FAILED我尝试了另一个版本的标签管理器依赖,但仍然不能工作。我理解依赖版本的问题,但我不知道如何解决它。
我的gradle依赖项
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'com.android.support:multidex:1.0.3'
testImplementation 'com.google.android.gms:play-services-tagmanager:17.0.0'
}
apply plugin: 'com.google.gms.google-services'这是颤动医生-v的输出
[✓] Flutter (Channel stable, v1.7.8+hotfix.4, on Linux, locale cs_CZ.UTF-8)
• Flutter version 1.7.8+hotfix.4 at /usr/lib/flutter
• Framework revision 20e59316b8 (10 days ago), 2019-07-18 20:04:33 -0700
• Engine revision fee001c93f
• Dart version 2.4.0
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /home/kleinpetr/Android/Sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.1
• Java binary at: /opt/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
• All Android licenses accepted.
[✓] Android Studio (version 3.4)
• Android Studio at /opt/android-studio
• Flutter plugin version 35.3.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.1)
• IntelliJ at /opt/idea-IU-191.7479.19
• Flutter plugin version 36.0.4
• Dart plugin version 191.7479.14
[✓] Connected device (1 available)
• Pixel • FA77T0304661 • android-arm64 • Android Q (API 28)
• No issues found!这是gradlew app的输出:依赖
debugRuntimeClasspath - Resolved configuration for runtime for variant: debug
+--- androidx.multidex:multidex:2.0.0
+--- project :firebase_core
| +--- com.google.firebase:firebase-core:16.0.9
| | \--- com.google.firebase:firebase-analytics:16.5.0
| | +--- com.google.android.gms:play-services-measurement:16.5.0
| | | +--- com.google.android.gms:play-services-basement:16.2.0
| | | | \--- androidx.legacy:legacy-support-v4:1.0.0
| | | | +--- androidx.core:core:1.0.0 -> 1.0.2
| | | | | +--- androidx.annotation:annotation:1.0.2
| | | | | +--- androidx.collection:collection:1.0.0
| | | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | +--- androidx.lifecycle:lifecycle-runtime:2.0.0
| | | | | | +--- androidx.lifecycle:lifecycle-common:2.0.0
| | | | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | | +--- androidx.arch.core:core-common:2.0.0
| | | | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | \--- androidx.versionedparcelable:versionedparcelable:1.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | \--- androidx.collection:collection:1.0.0 (*)
| | | | +--- androidx.media:media:1.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | | | \--- androidx.versionedparcelable:versionedparcelable:1.0.0 (*)
| | | | +--- androidx.legacy:legacy-support-core-utils:1.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | | | +--- androidx.documentfile:documentfile:1.0.0
| | | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | +--- androidx.loader:loader:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | | +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | | | | +--- androidx.lifecycle:lifecycle-livedata:2.0.0
| | | | | | | +--- androidx.arch.core:core-runtime:2.0.0
| | | | | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | | | | \--- androidx.arch.core:core-common:2.0.0 (*)
| | | | | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0
| | | | | | | | +--- androidx.lifecycle:lifecycle-common:2.0.0 (*)
| | | | | | | | +--- androidx.arch.core:core-common:2.0.0 (*)
| | | | | | | | \--- androidx.arch.core:core-runtime:2.0.0 (*)
| | | | | | | \--- androidx.arch.core:core-common:2.0.0 (*)
| | | | | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0
| | | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
| | | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | \--- androidx.print:print:1.0.0
| | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | +--- androidx.legacy:legacy-support-core-ui:1.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | | | +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
| | | | | +--- androidx.customview:customview:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | | \--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | | | +--- androidx.viewpager:viewpager:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | | +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | | | | \--- androidx.customview:customview:1.0.0 (*)
| | | | | +--- androidx.coordinatorlayout:coordinatorlayout:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | | +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | | | | \--- androidx.customview:customview:1.0.0 (*)
| | | | | +--- androidx.drawerlayout:drawerlayout:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | | +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | | | | \--- androidx.customview:customview:1.0.0 (*)
| | | | | +--- androidx.slidingpanelayout:slidingpanelayout:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | | +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | | | | \--- androidx.customview:customview:1.0.0 (*)
| | | | | +--- androidx.interpolator:interpolator:1.0.0
| | | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | | +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | | | | \--- androidx.interpolator:interpolator:1.0.0 (*)
| | | | | +--- androidx.asynclayoutinflater:asynclayoutinflater:1.0.0
| | | | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | | | \--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | | | \--- androidx.cursoradapter:cursoradapter:1.0.0
| | | | | \--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | \--- androidx.fragment:fragment:1.0.0
| | | | +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | | +--- androidx.legacy:legacy-support-core-ui:1.0.0 (*)
| | | | +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
| | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | +--- androidx.loader:loader:1.0.0 (*)
| | | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 (*)
| | | +--- com.google.android.gms:play-services-measurement-base:[16.5.0] -> 16.5.0
| | | | \--- com.google.android.gms:play-services-basement:16.2.0 (*)
| | | +--- com.google.android.gms:play-services-measurement-impl:[16.5.0] -> 16.5.0
| | | | +--- com.google.android.gms:play-services-ads-identifier:16.0.0
| | | | | \--- com.google.android.gms:play-services-basement:16.0.1 -> 16.2.0 (*)
| | | | +--- com.google.android.gms:play-services-basement:16.2.0 (*)
| | | | +--- com.google.android.gms:play-services-measurement-base:[16.5.0] -> 16.5.0 (*)
| | | | \--- com.google.android.gms:play-services-stats:16.0.1
| | | | \--- com.google.android.gms:play-services-basement:16.0.1 -> 16.2.0 (*)
| | | \--- com.google.android.gms:play-services-stats:16.0.1 (*)
| | +--- com.google.android.gms:play-services-measurement-api:16.5.0
| | | +--- com.google.android.gms:play-services-basement:16.2.0 (*)
| | | +--- com.google.android.gms:play-services-measurement-base:[16.5.0] -> 16.5.0 (*)
| | | +--- com.google.android.gms:play-services-measurement-impl:[16.5.0] -> 16.5.0 (*)
| | | +--- com.google.android.gms:play-services-measurement-sdk-api:[16.5.0] -> 16.5.0
| | | | +--- com.google.android.gms:play-services-basement:16.2.0 (*)
| | | | \--- com.google.android.gms:play-services-measurement-base:[16.5.0] -> 16.5.0 (*)
| | | +--- com.google.android.gms:play-services-tasks:16.0.1
| | | | \--- com.google.android.gms:play-services-basement:16.0.1 -> 16.2.0 (*)
| | | +--- com.google.firebase:firebase-common:16.0.3 -> 17.0.0
| | | | +--- com.google.android.gms:play-services-basement:16.0.1 -> 16.2.0 (*)
| | | | +--- com.google.android.gms:play-services-tasks:16.0.1 (*)
| | | | \--- com.google.auto.value:auto-value-annotations:1.6.3
| | | +--- com.google.firebase:firebase-iid:17.1.2 -> 18.0.0
| | | | +--- com.google.android.gms:play-services-basement:16.0.1 -> 16.2.0 (*)
| | | | +--- com.google.android.gms:play-services-stats:16.0.1 (*)
| | | | +--- com.google.android.gms:play-services-tasks:16.0.1 (*)
| | | | +--- com.google.firebase:firebase-common:17.0.0 (*)
| | | | \--- com.google.firebase:firebase-iid-interop:16.0.1
| | | | +--- com.google.android.gms:play-services-base:16.0.1
| | | | | +--- com.google.android.gms:play-services-basement:16.0.1 -> 16.2.0 (*)
| | | | | \--- com.google.android.gms:play-services-tasks:16.0.1 (*)
| | | | \--- com.google.android.gms:play-services-basement:16.0.1 -> 16.2.0 (*)
| | | \--- com.google.firebase:firebase-measurement-connector:17.0.1
| | | \--- com.google.android.gms:play-services-basement:16.0.1 -> 16.2.0 (*)
| | \--- com.google.android.gms:play-services-measurement-sdk:16.5.0
| | +--- com.google.android.gms:play-services-basement:16.2.0 (*)
| | +--- com.google.android.gms:play-services-measurement-base:[16.5.0] -> 16.5.0 (*)
| | +--- com.google.android.gms:play-services-measurement-impl:[16.5.0] -> 16.5.0 (*)
| | \--- com.google.android.gms:play-services-measurement-sdk-api:[16.5.0] -> 16.5.0 (*)
| \--- com.google.firebase:firebase-common:16.1.0 -> 17.0.0 (*)
+--- project :image_picker
| \--- androidx.legacy:legacy-support-v4:1.0.0 (*)
+--- project :flutter_local_notifications
| +--- androidx.core:core:1.0.1 -> 1.0.2 (*)
| \--- com.google.code.gson:gson:2.8.2
+--- project :file_picker
| \--- androidx.appcompat:appcompat:1.0.0-beta01 -> 1.0.0
| +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| +--- androidx.collection:collection:1.0.0 (*)
| +--- androidx.cursoradapter:cursoradapter:1.0.0 (*)
| +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
| +--- androidx.fragment:fragment:1.0.0 (*)
| +--- androidx.vectordrawable:vectordrawable:1.0.0
| | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | \--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| \--- androidx.vectordrawable:vectordrawable-animated:1.0.0
| +--- androidx.vectordrawable:vectordrawable:1.0.0 (*)
| \--- androidx.legacy:legacy-support-core-ui:1.0.0 (*)
+--- project :vibration
+--- project :keyboard_visibility
+--- project :image_picker_saver
| \--- androidx.core:core:1.0.0 -> 1.0.2 (*)
+--- project :connectivity
+--- project :fluttertoast
| \--- androidx.core:core:1.0.2 (*)
+--- project :image_downloader
| +--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.21
| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.21
| | +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.3.21
| | \--- org.jetbrains:annotations:13.0
| \--- androidx.core:core:1.0.1 -> 1.0.2 (*)
+--- project :contacts_service
+--- project :share
+--- project :permission_handler
| +--- androidx.annotation:annotation:1.0.2
| \--- androidx.core:core:1.0.2 (*)
+--- project :uni_links
+--- project :firebase_messaging
| +--- com.google.firebase:firebase-messaging:18.0.0
| | +--- com.google.android.gms:play-services-basement:16.0.1 -> 16.2.0 (*)
| | +--- com.google.android.gms:play-services-tasks:16.0.1 (*)
| | +--- com.google.firebase:firebase-common:17.0.0 (*)
| | +--- com.google.firebase:firebase-iid:[18.0.0] -> 18.0.0 (*)
| | \--- com.google.firebase:firebase-measurement-connector:17.0.1 (*)
| +--- com.google.firebase:firebase-common:16.1.0 -> 17.0.0 (*)
| +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| \--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0 (*)
+--- project :device_id
+--- project :image_gallery_saver
| \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.20 -> 1.3.21 (*)
+--- project :shared_preferences
+--- project :flutter_facebook_login
| \--- com.facebook.android:facebook-login:4.39.0
| +--- com.facebook.android:facebook-core:4.39.0
| | +--- com.parse.bolts:bolts-android:1.4.0
| | | +--- com.parse.bolts:bolts-tasks:1.4.0
| | | \--- com.parse.bolts:bolts-applinks:1.4.0
| | | \--- com.parse.bolts:bolts-tasks:1.4.0
| | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | \--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
| +--- com.facebook.android:facebook-common:4.39.0
| | +--- com.facebook.android:facebook-core:4.39.0 (*)
| | +--- com.google.zxing:core:3.3.0
| | +--- androidx.legacy:legacy-support-v4:1.0.0 (*)
| | +--- androidx.appcompat:appcompat:1.0.0 (*)
| | +--- androidx.cardview:cardview:1.0.0
| | | \--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | \--- androidx.browser:browser:1.0.0
| | +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | +--- androidx.interpolator:interpolator:1.0.0 (*)
| | +--- androidx.collection:collection:1.0.0 (*)
| | \--- androidx.legacy:legacy-support-core-ui:1.0.0 (*)
| \--- androidx.appcompat:appcompat:1.0.0 (*)
+--- project :sqflite
+--- project :path_provider
+--- project :firebase_analytics
| +--- com.google.firebase:firebase-analytics:16.5.0 (*)
| \--- com.google.firebase:firebase-common:16.1.0 -> 17.0.0 (*)
+--- project :url_launcher
+--- project :multi_image_picker
| +--- androidx.exifinterface:exifinterface:1.0.0
| | \--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| +--- com.sangcomz:FishBun:0.10.0
| | +--- androidx.constraintlayout:constraintlayout:1.1.3
| | | \--- androidx.constraintlayout:constraintlayout-solver:1.1.3
| | +--- com.google.android.material:material:1.0.0
| | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | +--- androidx.legacy:legacy-support-core-ui:1.0.0 (*)
| | | +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
| | | +--- androidx.fragment:fragment:1.0.0 (*)
| | | +--- androidx.transition:transition:1.0.0
| | | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | | \--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | +--- androidx.appcompat:appcompat:1.0.0 (*)
| | | +--- androidx.cardview:cardview:1.0.0 (*)
| | | \--- androidx.recyclerview:recyclerview:1.0.0
| | | +--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| | | +--- androidx.core:core:1.0.0 -> 1.0.2 (*)
| | | \--- androidx.legacy:legacy-support-core-ui:1.0.0 (*)
| | \--- androidx.recyclerview:recyclerview:1.0.0 (*)
| \--- com.github.bumptech.glide:glide:4.9.0
| +--- com.github.bumptech.glide:gifdecoder:4.9.0
| | \--- androidx.annotation:annotation:1.0.0 -> 1.0.2
| +--- com.github.bumptech.glide:disklrucache:4.9.0
| +--- com.github.bumptech.glide:annotations:4.9.0
| +--- androidx.fragment:fragment:1.0.0 (*)
| \--- androidx.vectordrawable:vectordrawable-animated:1.0.0 (*)
+--- project :google_sign_in
| +--- com.google.android.gms:play-services-auth:16.0.1
| | +--- com.google.android.gms:play-services-auth-api-phone:16.0.0
| | | +--- com.google.android.gms:play-services-base:16.0.1 (*)
| | | +--- com.google.android.gms:play-services-basement:16.0.1 -> 16.2.0 (*)
| | | \--- com.google.android.gms:play-services-tasks:16.0.1 (*)
| | +--- com.google.android.gms:play-services-auth-base:16.0.0
| | | +--- com.google.android.gms:play-services-base:16.0.1 (*)
| | | +--- com.google.android.gms:play-services-basement:16.0.1 -> 16.2.0 (*)
| | | \--- com.google.android.gms:play-services-tasks:16.0.1 (*)
| | +--- com.google.android.gms:play-services-base:16.0.1 (*)
| | +--- com.google.android.gms:play-services-basement:16.0.1 -> 16.2.0 (*)
| | \--- com.google.android.gms:play-services-tasks:16.0.1 (*)
| \--- com.google.guava:guava:20.0
+--- project :flutter_sms
+--- project :flutter_statusbarcolor
| \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.21 (*)
\--- com.android.support:multidex:1.0.3 -> androidx.multidex:multidex:2.0.0
debugRuntimeElements - Runtime elements for debug (n)
No dependencies
debugRuntimeOnly - Runtime only dependencies for 'debug' sources. (n)
No dependencies
debugUnitTestAnnotationProcessorClasspath - Resolved configuration for annotation-processor for variant: debugUnitTest
No dependencies
debugUnitTestCompileClasspath - Resolved configuration for compilation for variant: debugUnitTest
Dependency resolved to an incompatible version: Dependency(fromArtifactVersion=ArtifactVersion(groupId=com.google.firebase, artifactId=firebase-mess
aging, version=18.0.0), toArtifact=Artifact(groupId=com.google.firebase, artifactId=firebase-iid), toArtifactVersionString=[18.0.0])
> Task :app:dependencies FAILED
*********************************************************
WARNING: This version of connectivity will break your Android build if it or its dependencies aren't compatible with AndroidX.
See ... for more information on the problem and how to fix it.
This warning prints for all Android build failures. The real root cause of the error may be unrelated.
*********************************************************
1 actionable task: 1 executed发布于 2019-08-08 21:54:55
在你的gradle下面添加这个
apply plugin: 'com.google.gms.google-services'在这之后
// Work around for googletagmanager-gradle-plugin compatibility
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true https://stackoverflow.com/questions/57269230
复制相似问题