New*_*oid 7 firebase android-gradle-plugin
我在我的项目上设置Firebase,当我添加inappmessaging-display lib时出现此错误:
依赖关系解析为不兼容的版本:依赖关系(fromArtifactVersion = ArtifactVersion(groupId = com.google.firebase,artifactId = firebase-messaging,版本= 17.3.2),toArtifact = Artifact(groupId = com.google.firebase,artifactId = firebase- iid),toArtifactVersionString = [17.0.2])失败:生成失败,出现异常。*出了什么问题:在最新检查期间,无法捕获任务':app:preDebugBuild'属性'compileManifests'的输入文件的指纹。在项目“应用”中,已解析的Google Play服务库依赖项依赖于另一个版本(例如“ [17.0。2]”),但尚未解析为该版本。库所表现出的行为将是未知的。 :com.google.firebase:firebase-messaging:17.3.2-> com.google.firebase:firebase-iid @ [17.0.2],但fire base-iid版本为17.0.3。以下依赖关系是直接或具有传递性依赖关系的项目依赖关系,会导致问题解决。-项目'app'取决于com.google.firebase:firebase-iid@17.0.3-项目'app'取决于com.google.firebase:firebase-messaging@17.3.2-项目'app'取决于com.google.firebase:firebase-ads@17.1.2-项目'app'取决于com.google.firebase:firebase-inappmessaging-display@17.0.4-项目'app'取决于com.google.firebase: firebase-analytics@16.0.6-项目'app'取决于com.google.firebase:firebase-analytics-impl@16.2.4-项目'app'取决于com.google.firebase:firebase-inappmessaging@17.0。4-项目'app'取决于com.google.firebase:firebase-core@16.0.6-项目'app'取决于com.google.firebase:firebase-measurement-connector-impl@17.0.4-项目'app'取决于com.google.firebase:firebase-config@16.1.3-项目'app'取决于com.google.firebase:firebase-crash@16.2.1-项目'app'取决于com.google .firebase:firebase-abt@16.0.1-项目'app'取决于com.google.firebase:firebase-perf@16.2.3-项目'app'取决于com.google.android.gms:play-services -measurement-api@16.0.4有关扩展的调试信息,请使用./gradlew --info:app:assembleDebug从命令行执行Gradle,以查看工件的dep endency路径。此错误消息来自google-services Gradle插件,
github.com/google/play-services-plugins并通过在build.gradle文件中添加“ googleServices {disableVersionCheck = false}”来禁用。
project file
buildscript {
ext.kotlin_version = '1.3.11'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.google.gms:google-services:4.2.0'
classpath ('com.google.firebase:firebase-plugins:1.1.5')
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
plugins {
id 'com.gradle.build-scan' version '1.16'
}
ext {
support_library_version = '28.0.0' //use the version of choice
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
app gradle file
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
buildScan {
licenseAgreementUrl = 'https://gradle.com/terms-of-service'
licenseAgree = 'yes'
}
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.orafaelsc.pocapp"
minSdkVersion 25
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "com.android.support:animated-vector-drawable:$support_library_version"
implementation "com.android.support:exifinterface:$support_library_version"
implementation "com.android.support:cardview-v7:$support_library_version"
implementation "com.android.support:customtabs:$support_library_version"
implementation "com.android.support:support-media-compat:$support_library_version"
implementation "com.android.support:support-v4:$support_library_version"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "com.android.support:appcompat-v7:$support_library_version"
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//Play services dependencies
implementation('com.google.android.gms:play-services-plus:15.0.1')
implementation('com.google.android.gms:play-services-gcm:15.0.1')
implementation('com.google.android.gms:play-services-maps:15.0.1')
implementation('com.google.android.gms:play-services-ads:15.0.1')
implementation('com.google.android.gms:play-services-location:15.0.1')
implementation('com.google.android.gms:play-services-analytics:16.0.3')
implementation('com.google.android.gms:play-services-basement:15.0.1')
implementation('com.google.android.gms:play-services-auth:16.0.0')
implementation('com.google.android.gms:play-services-drive:15.0.1')
//General google dependencies
implementation('com.android.installreferrer:installreferrer:1.0')
implementation('com.android.billingclient:billing:1.2')
//Firebase dependencies
implementation('com.google.firebase:firebase-core:16.0.6')
implementation('com.google.firebase:firebase-perf:16.2.3')
implementation('com.google.firebase:firebase-ads:17.1.2')
implementation('com.google.firebase:firebase-crash:16.2.1')
implementation('com.google.firebase:firebase-config:16.1.3')
implementation('com.google.firebase:firebase-messaging:17.3.2')
implementation('com.google.firebase:firebase-inappmessaging:17.0.4')
implementation('com.google.firebase:firebase-inappmessaging-display:17.0.4')
}
apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud)
我已经将所有库更新为最新版本。
| 归档时间: |
|
| 查看次数: |
5815 次 |
| 最近记录: |