在最新检查期间无法捕获任务':app:preDebugBuild'属性'compileManifests'的输入文件的指纹

时间:2019-01-15 20:43:54

标签: firebase android-gradle

我正在我的项目上设置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。        以下依赖关系是直接的或具有传递性依赖关系的项目依赖关系,这些依赖关系导致了ifact   与问题。 -项目“ 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-项目“应用”   取决于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-   项目“应用”取决于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持久性   工件的路径。此错误消息来自   google-services Gradle插件,在https://
报告问题   github.com/google/play-services-plugins并通过添加禁用   “ googleServices {disableVersionCheck = false}”到build.gradle   文件。

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'

我已经将所有库更新为最新版本。

5 个答案:

答案 0 :(得分:1)

我也面临着同样的问题, 终于有了解决方案。 请删除Cordova-plugin-firebase和

只需运行即可使用最新的主要发行版:cordova插件添加cordova-plugin-firebase-lib

只需点击以下链接:https://www.npmjs.com/package/cordova-plugin-firebase-lib

答案 1 :(得分:0)

检查您的互联网连接。
如果已连接,请尝试使用代理服务器(使用热点屏蔽,PSiphone等)

答案 2 :(得分:0)

/platforms/android/project.properties

cordova.system.library.5 = com.google.firebase:firebase-messaging:17.3.2 //更改此版本<- cordova.system.library.5 = com.google.firebase:firebase-messaging:17.0.3

答案 3 :(得分:0)

cd android ./gradlew clean 试试这个

答案 4 :(得分:0)

问题出在firebase libs版本上,只需更新每个lib即可解决此问题。