В проекте 'app' разрешенная зависимость библиотеки сервисов Google Play зависит от другой конкретной версии (например, «[16.0 - PullRequest
0 голосов
/ 09 мая 2020
  • привет, я реализую firebase cra sh analytics. Когда я добавил firebase sdk в свой проект, эта ошибка отображается. Я пытаюсь решить, ухудшая sdk, он показывает некоторую ошибку. когда я запускаю приложение выше, ошибка продолжает отображаться. Я застрял в этом на время журнала, я попытался снизить реализацию, но он показывает другую ошибку. так что можете ли вы решить эту проблему для меня. ниже добавлена ​​ошибка сборки и код градиента. поэтому можете решить эту проблему.

    Исключение: org.gradle.api.tasks.TaskExecutionException: Выполнение не выполнено для задачи ' : app: preDebugBuild '. в org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute (CatchExceptionTaskExecuter. java: 38) в org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.executeTask (* EventcFiringTaskExe: * 1031 ) в org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.call (EventFiringTaskExecuter. java: 55) в org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter $ 1.call (EventFiringTask * .Executer. : 52) в org.gradle.internal.operations.DefaultBuildOperationExecutor $ CallableBuildOperationWorker.execute (DefaultBuildOperationExecutor. java: 416) в org.gradle.internal.operations.DefaultBuildOperationOperationExecutor * 10 CallableBuildOperationExecutor $ 10 CallableBuildOperation org.gradle.internal.operations.DefaultBuildOperationExecutor $ 1.execute (DefaultBuildOperationExecutor. java: 165) в org.gradle.internal.operations.DefaultBuildOperationExecutor.execute (DefaultBuildOperationExecutor. java: 250) в . DefaultBuildOperationExecutor.execute (DefaultBuildOperationExecutor. java: 158) в org.gradle.internal.operations.DefaultBuildOperationExecutor.call (DefaultBuildOperationExecutor. java: 102) в org.gradle.internal.operationBextor. *: 36) в org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute (EventFiringTaskExecuter. java: 52) в org.gradle.execution.plan.LocalTaskNodeExecutor.execute (LocalTaskNodeExecutor. java: в org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ InvokeNodeExecutorsAction.execute (DefaultTaskExecutionGraph. java: 355) в org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ InvokeNodeExecutors. .execution.taskgraph.DefaultTaskExecutionGraph $ BuildOperationAwareExecutionAction.execute (DefaultTaskExecutionGraph. java: 336) в org.gradle.execution.taskgraph.DefaultTaskExecutionGraph $ BuildOperationAwareExecuti onAction.execute (DefaultTaskExecutionGraph. java: 322) в org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker $ 1.execute (DefaultPlanExecutor. java: 134) в org.gradle.execution.plan.DefaultPlanExecutor $ Executor. выполнить (DefaultPlanExecutor. java: 129) в org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.execute (DefaultPlanExecutor. java: 202) в org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorkerNecuteNecutor $ ExecutorWorkerNecuteNecutor $ ExecutorWorkerNecuteNecutor java: 193) в org.gradle.execution.plan.DefaultPlanExecutor $ ExecutorWorker.run (DefaultPlanExecutor. java: 129) в org.gradle.internal.concurrent.ExecutorPolicy $ CatchAndRecordFailures.onExecute (*. Execut 64) в org.gradle.internal.concurrent.ManagedExecutorImpl $ 1.run (ManagedExecutorImpl. java: 48) в org.gradle.internal.concurrent.ThreadFactoryImpl $ ManagedThreadRunnable.run (ThreadFactoryImpl. java: 56) org.gradle.api.GradleException: в проекте app разрешена зависимость библиотеки сервисов Google Play. зависит от другого в точной версии (например, «[18.0. 0] ", но не разрешается для этой версии. Поведение, демонстрируемое библиотекой, будет неизвестно.

    Сбой зависимости: com.google.firebase: firebase-messaging: 18.0.0 -> com.google .firebase: firebase-iid @ [18.0.0], но версия firebase-iid была 20.1.5.

    Следующие зависимости являются зависимостями проекта, которые являются прямыми или имеют транзитивные зависимости, которые приводят к искусству, если они касаются проблемы. - Проект «приложение» зависит от com.google. firebase:firebase-config@17.0.0 - Проект «приложение» зависит от com.google. firebase:firebase-messaging@18.0.0 - Проект «приложение» зависит от com.google. firebase:firebase-core@17.0.1 - Проектное приложение 'зависит от com.google.firebase: firebase-crashlytics @ {строго 17.0.0} - проект "приложение" зависит от com.google.firebase: firebase-config @ {строго 17.0.0} - проект "приложение" зависит на com.google. firebase:firebase-analytics@17.2.2 - Проект "приложение" зависит от com.google.firebase: firebase-iid @ {строго 20.1.5} - Проект "приложение" зависит от com.google.firebase: firebase-core @ {строго 17.0.1} - проект "приложение" зависит от com.google.firebase: firebase-messaging @ {строго 18.0.0} - проект "приложение" зависит от com.google. firebase:firebase-crashlytics@17.0.0 - проект "приложение" 'зависит от com.google. android .gms: play-services-measure-api @ {строго 17.2.2} - проект "app" зависит от com.google.firebase: firebase-analytics @ {строго 17.2.2. }

    Для получения расширенной информации об отладке выполните Gradle из командной строки с помощью ./gradlew --info: app: AssemblyDebug, чтобы увидеть пути зависимостей к артефакт. Это сообщение об ошибке пришло из подключаемого модуля Gradle для сервисов Google, о проблемах сообщайте по адресу https: // github.com/google/play-services-plugins и отключите, добавив «googleServices {disableVersionCheck = false}» в файл b uild.gradle.

    СБОЙ СБОЙ за 5 с

        buildscript {
            ext.kotlin_version = '1.3.31'
            repositories {
                google()
                jcenter()
                maven { url 'https://maven.fabric.io/public' }
            }
            dependencies {
                classpath 'com.android.tools.build:gradle:3.4.1'
                classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.2"
                classpath 'com.google.gms:google-services:4.2.0'
                classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
                classpath 'net.sf.proguard:proguard-gradle:6.0.3'
                classpath 'io.fabric.tools:gradle:1.+'
                classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
                classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.0'
    
                // NOTE: Do not place your application dependencies here; they belong
                // in the individual module build.gradle files
            }
        }
    
        allprojects {
            repositories {
                google()
                jcenter()
                maven { url "https://jitpack.io" }
                maven {
                    url "https://maven.google.com"
                    // Google's Maven repository
                }
            }
        }
    
        task clean(type: Delete) {
            delete rootProject.buildDir
        }
    
    
    apply plugin: 'com.android.application'
    apply plugin: 'kotlin-android-extensions'
    apply plugin: 'kotlin-android'
    apply plugin: 'io.fabric'
    
    android {
        compileSdkVersion 28
        defaultConfig {
            applicationId "com.taxi.deals.newuser"
            minSdkVersion 19
            targetSdkVersion 28
            versionCode 90
            versionName "0.7"
            testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            vectorDrawables.useSupportLibrary = true
            multiDexEnabled true
    
        }
    
        /* signingConfigs {
            release {
                storeFile file("")
                storePassword ""
                keyAlias ""
                keyPassword ""
            }
        }*/
        buildTypes {
    
            debug {
    
                buildConfigField("String", "BASE_URL", "\"http://1-dot-taxi2.appspot.com\"")
                buildConfigField("String", "BASE_URL_SWISS", "\"http://1-dot-taxi2.appspot.com\"")
                buildConfigField("String", "BASE_URL_IN", "\"http://1-dot-taxi2.appspot.com\"")
                buildConfigField("String", "API_KEY", "\"ABCXYZ123TEST\"")
            }
            release {
                minifyEnabled false
                useProguard false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                buildConfigField("String", "BASE_URL", "\"http://1-dot-taxi2.appspot.com\"")
                buildConfigField("String", "BASE_URL_SWISS", "\"http://1-dot-taxi2.appspot.com\"")
                buildConfigField("String", "BASE_URL_IN", "\"http://1-dot-taxi2.appspot.com\"")
                buildConfigField("String", "API_KEY", "\"ABCXYZ123TEST\"")
            }
        }
    /*    sourceSets {
            main {
                manifest.srcFile 'AndroidManifest.xml'
                java.srcDirs = ['src']
                resources.srcDirs = ['src']
                aidl.srcDirs = ['src']
                renderscript.srcDirs = ['src']
                res.srcDirs = ['res']
                assets.srcDirs = ['assets']
            }
            uat {
                res.srcDir('uat/res')
            }
            prod {
                res.srcDir('prod/res')
            }
            // Move the build types to build-types/<type>
            // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
            // This moves them out of them default location under src/<type>/... which would
            // conflict with src/ being used by the main source set.
            // Adding new build types or product flavors should be accompanied
            // by a similar customization.
            debug.setRoot('build-types/debug')
            release.setRoot('build-types/release')
        }
    
        flavorDimensions ""
        productFlavors {
            uat {
                applicationId 'http://1-dot-taxi2deals.appspot.com'
                versionCode 1
    
    
            }
            prod {
                applicationId 'http://1-dot-taxi2deal.appspot.com'
                versionCode 1
            }
        }*/
        repositories {
            maven { url 'https://maven.fabric.io/public' }
        }
        buildToolsVersion '28.0.3'
        compileOptions {
            targetCompatibility 1.8
            sourceCompatibility 1.8
        }
        lintOptions {
            checkReleaseBuilds false
        }
    
        bundle {
            language {
                // Specifies that the app bundle should not support
                // configuration APKs for language resources. These
                // resources are instead packaged with each base and
                // dynamic feature APK.
                enableSplit = false
            }
        }
    }
    
    dependencies {
        implementation 'pl.droidsonroids.gif:android-gif-drawable:1.2.+'
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation 'com.android.support:support-v13:28.0.0'
        implementation 'com.android.support:exifinterface:28.0.0'
        implementation 'com.android.support:animated-vector-drawable:28.0.0'
        implementation 'com.android.support:design:28.0.0'
        implementation 'com.android.support.constraint:constraint-layout:1.1.3'
        implementation 'com.github.GoodieBag:CarouselPicker:v1.1'
    
        //Adding Fast Android Networking
        implementation 'com.github.matecode:Snacky:1.0.3'
        implementation "com.android.support:cardview-v7:28.0.0"
        //external lib
    
    
        implementation 'com.jakewharton:butterknife:8.8.1'
        annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
        implementation 'com.romandanylyk:pageindicatorview:1.0.1@aar'
        implementation "com.google.code.gson:gson:2.8.5"
    
        implementation 'com.intuit.ssp:ssp-android:1.0.5'
        implementation 'com.chootdev:typefaced:1.1.7'
        // reactive
        implementation "io.reactivex.rxjava2:rxjava:2.1.12"
        implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
        /*Dagger*/
        implementation "com.google.dagger:dagger:2.16"
        annotationProcessor "com.google.dagger:dagger-compiler:2.16"
        compileOnly "org.glassfish:javax.annotation:10.0-b28"
        implementation 'javax.inject:javax.inject:1'
        // network
        implementation "com.amitshekhar.android:rx2-android-networking:1.0.2"
        // swipe view
        implementation "com.mindorks:placeholderview:0.6.1"
        // logger
        implementation "com.jakewharton.timber:timber:4.7.0"
        //country num
        implementation 'com.hbb20:ccp:2.2.4'
        //map
        implementation 'com.google.android.gms:play-services-maps:16.1.0'
        implementation 'com.google.android.gms:play-services-location:16.0.0'
       implementation 'com.google.android.gms:play-services-places:16.1.0'
        implementation 'com.google.firebase:firebase-firestore:19.0.0'
        implementation 'com.google.firebase:firebase-config:17.0.0'
        implementation 'com.google.firebase:firebase-messaging:18.0.0'
        implementation 'com.google.android.libraries.places:places:1.0.0'
        implementation 'com.squareup.okhttp3:okhttp:3.11.0'
        debugImplementation "com.amitshekhar.android:debug-db:1.0.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'
        implementation 'com.squareup.picasso:picasso:2.71828'
        implementation 'com.squareup.retrofit2:retrofit:2.4.0'
        implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
        implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
        implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'
        implementation 'com.novoda:merlin:1.2.0'
        implementation project(path: ':Arclibrary')
        implementation project(':trail')
        implementation project(':cartype')
    
        implementation 'com.yarolegovich:mp:1.0.9'
        implementation('com.paytm:pgplussdk:1.2.3') {
            transitive = true;
        }
        implementation 'com.paytm:pgplussdk:1.2.3'
        implementation('com.crashlytics.sdk.android:crashlytics:2.9.8@aar') {
            transitive = true;
        }
        //stripe payment gateway
        implementation 'com.stripe:stripe-android:6.1.2'
        implementation 'com.android.support:support-annotations:28.0.0'
        implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
        implementation 'com.theartofdev.edmodo:android-image-cropper:1.2.1'
        implementation 'com.github.yalantis:ucrop:2.2.3'
        implementation 'com.google.code.gson:gson:2.6.1'
        implementation "com.squareup.moshi:moshi:1.6.0"
        implementation "com.adyen.checkout:ui:2.4.4"
        implementation "com.adyen.checkout:nfc:2.4.4"
        implementation 'com.google.android.gms:play-services-wallet:16.0.0'
        implementation 'com.google.android.play:core:1.7.2'
        implementation 'com.facebook.android:facebook-android-sdk:[5,6)'
        implementation 'com.squareup.picasso:picasso:2.71828'
        implementation 'com.google.firebase:firebase-core:16.0.1'
        implementation 'com.google.firebase:firebase-auth:17.0.0'
        implementation 'com.google.firebase:firebase-analytics:17.4.1'
        implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
    }
    apply plugin: 'com.google.gms.google-services'
    apply plugin: 'com.google.firebase.crashlytics'
    
    
    configurations.all {
        resolutionStrategy.force 'com.android.support:support-annotations:28.0.0'
    }
    repositories {
        mavenCentral()
    }
    

Ответы [ 2 ]

0 голосов
/ 26 мая 2020

Firebaser здесь -

Похоже, вы столкнулись с проблемой несоответствия зависимостей, когда вы определили версию IID, но есть и другие зависимости, возникающие в разных версиях этой библиотеки. Есть несколько вещей, которые могут помочь:

  1. Обновление вашей версии com.google.gms:google-services (4.3.3)

  2. Обновление вашей версии Firebase Messaging (20.1.3)

  3. Вы также можете попробовать добавить этот disableVersionCheck, который вы упомянули в своем сообщении, если вы еще этого не сделали.

0 голосов
/ 09 мая 2020
 implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'

У меня работает только зависимость от crashlytics

...