response-native-firebase: compileDebugRenderscript СБОЙ: Не удалось разрешить android .arch.lifecycle: время выполнения: 1.1.0 - PullRequest
0 голосов
/ 20 февраля 2020

Обратите внимание, что публикация в StackOverflow - это мой последний выбор, и я уже потратил часы на поиск проблем GitHub и связанных с ними вопросов.

Проблема возникла, как только я добавил implementation project(':react-native-image-picker') и implementation "com.google.firebase:firebase-storage:16.0.5" в android/app/build.gradle.

  1. упаковка. json
  "dependencies": {
    "@mapbox/polyline": "^1.0.0",
    "@react-native-community/async-storage": "^1.7.1",
    "axios": "^0.18.0",
    "geolib": "^2.0.24",
    "i18n-js": "^3.0.11",
    "lodash": "^4.17.11",
    "moment": "^2.22.2",
    "native-base": "^2.12.1",
    "prop-types": "^15.6.2",
    "react": "16.8.3",
    "react-native": "0.59.9",
    "react-native-background-timer": "2.0.0",
    "react-native-device-info": "^2.1.2",
    "react-native-firebase": "5.0.0",
    "react-native-image-picker": "^2.3.0",
    "react-native-iphone-x-helper": "^1.2.0",
    "react-native-keep-awake": "^4.0.0",
    "react-native-languages": "^3.0.0",
    "react-native-maps": "0.24.2",
    "react-native-maps-directions": "^1.6.0",
    "react-native-permissions": "^1.1.1",
    "react-native-phone-input": "^0.2.1",
    "react-native-popup-dialog": "^0.15.0",
    "react-native-sound-player": "^0.10.0",
    "react-native-splash-screen": "^3.1.1",
    "react-native-vector-icons": "^6.3.0",
    "react-navigation": "2.0.0-rc.9",
    "react-navigation-redux-helpers": "^2.0.5",
    "react-redux": "^5.0.7",
    "react-timer-mixin": "^0.13.4",
    "redux": "^4.0.0",
    "redux-thunk": "^2.3.0",
    "reselect": "^4.0.0"
  },
android / build.gradle
buildscript {
    ext {
        buildToolsVersion = "28.0.2"
        compileSdkVersion = 28
        targetSdkVersion = 28
        supportLibVersion = "27.1.1"
        googlePlayServicesVersion = "15.0.1"
    }
    repositories {
        google()
        jcenter()
        maven {
            url 'https://maven.fabric.io/public'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0'
        classpath 'com.google.gms:google-services:4.2.0'
        classpath 'io.fabric.tools:gradle:1.25.4'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

subprojects { project -> 
  afterEvaluate {
        if((project.plugins.hasPlugin('android') || project.plugins.hasPlugin('android-library'))) {
            android {
                compileSdkVersion rootProject.ext.compileSdkVersion
                buildToolsVersion rootProject.ext.buildToolsVersion
            }
        }
    }
}

allprojects {
    repositories {
        google()
        mavenLocal()
        jcenter()
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
    }

    configurations.all {
            resolutionStrategy {
                force "com.google.android.gms:play-services-basement:$googlePlayServicesVersion"
                force "com.google.android.gms:play-services-tasks:$googlePlayServicesVersion"
            }
        }
}


task wrapper(type: Wrapper) {
    gradleVersion = '4.4'
    distributionUrl = distributionUrl.replace("bin", "all")
}
android / app / build.gradle
dependencies {
    implementation project(':@react-native-community_async-storage')
    implementation project(':react-native-sound-player')
    implementation project(':react-native-device-info')
    implementation project(':react-native-languages')
    implementation project(':react-native-background-timer')
    implementation project(':react-native-keep-awake')
    implementation project(':react-native-vector-icons')
    implementation project(':react-native-splash-screen')
    implementation project(':react-native-firebase')
    implementation project(':react-native-image-picker')
    implementation project(':react-native-maps')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation "com.google.android.gms:play-services-base:16.0.1"
    implementation "com.google.firebase:firebase-core:16.0.4"
    implementation "com.google.firebase:firebase-auth:16.0.5"
    implementation "com.google.firebase:firebase-database:16.0.4"
    implementation "com.google.firebase:firebase-functions:16.1.2"
    implementation "com.google.firebase:firebase-config:16.1.0"
    implementation "com.google.firebase:firebase-messaging:17.3.3"
    implementation "com.google.firebase:firebase-storage:16.0.5"
    implementation('com.crashlytics.sdk.android:crashlytics:2.9.5@aar') {
        transitive = true
    }
}
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

Произошла ошибка - ошибка сборки

> Task :react-native-firebase:compileDebugRenderscript FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':react-native-firebase:debugCompileClasspath'.
> Could not resolve android.arch.lifecycle:runtime:1.1.0.
  Required by:
      project :react-native-firebase
   > Cannot find a version of 'android.arch.lifecycle:runtime' that satisfies the version constraints: 
        Dependency path 'bhsDriver:react-native-firebase:unspecified' --> 'com.google.firebase:firebase-database:16.0.2' --> 'android.arch.lifecycle:runtime:1.1.1'
        Dependency path 'bhsDriver:react-native-firebase:unspecified' --> 'com.google.firebase:firebase-firestore:17.1.0' --> 'android.arch.lifecycle:runtime:1.0.0'
        Dependency path 'bhsDriver:react-native-firebase:unspecified' --> 'com.google.firebase:firebase-storage:16.0.2' --> 'android.arch.lifecycle:runtime:1.1.1'
        Dependency path 'bhsDriver:react-native-firebase:unspecified' --> 'com.android.support:support-v4:27.1.1' --> 'com.android.support:support-compat:27.1.1' --> 'android.arch.lifecycle:runtime:1.1.0'
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.lifecycle:runtime' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.lifecycle:runtime' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.lifecycle:runtime' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.lifecycle:runtime' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.lifecycle:runtime' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0

> Could not resolve android.arch.lifecycle:common:1.1.0.
  Required by:
      project :react-native-firebase
   > Cannot find a version of 'android.arch.lifecycle:common' that satisfies the version constraints: 
        Dependency path 'bhsDriver:react-native-firebase:unspecified' --> 'com.google.firebase:firebase-database:16.0.2' --> 'android.arch.lifecycle:common:1.1.1'
        Dependency path 'bhsDriver:react-native-firebase:unspecified' --> 'com.google.firebase:firebase-storage:16.0.2' --> 'android.arch.lifecycle:common:1.1.1'
        Dependency path 'bhsDriver:react-native-firebase:unspecified' --> 'com.google.firebase:firebase-database:16.0.2' --> 'android.arch.lifecycle:runtime:1.1.1' --> 'android.arch.lifecycle:common:1.1.1'
        Dependency path 'bhsDriver:react-native-firebase:unspecified' --> 'com.android.support:support-v4:27.1.1' --> 'com.android.support:support-fragment:27.1.1' --> 'android.arch.lifecycle:livedata-core:1.1.0' --> 'android.arch.lifecycle:common:1.1.0'
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.lifecycle:common' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.lifecycle:common' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.lifecycle:common' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.lifecycle:common' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.lifecycle:common' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0

> Could not resolve android.arch.core:common:1.1.0.
  Required by:
      project :react-native-firebase
   > Cannot find a version of 'android.arch.core:common' that satisfies the version constraints: 
        Dependency path 'bhsDriver:react-native-firebase:unspecified' --> 'com.google.firebase:firebase-database:16.0.2' --> 'android.arch.core:common:1.1.1'
        Dependency path 'bhsDriver:react-native-firebase:unspecified' --> 'com.google.firebase:firebase-storage:16.0.2' --> 'android.arch.core:common:1.1.1'
        Dependency path 'bhsDriver:react-native-firebase:unspecified' --> 'com.google.firebase:firebase-database:16.0.2' --> 'android.arch.core:runtime:1.1.1' --> 'android.arch.core:common:1.1.1'
        Dependency path 'bhsDriver:react-native-firebase:unspecified' --> 'com.google.firebase:firebase-database:16.0.2' --> 'android.arch.lifecycle:runtime:1.1.1' --> 'android.arch.core:common:1.1.1'
        Dependency path 'bhsDriver:react-native-firebase:unspecified' --> 'com.android.support:support-v4:27.1.1' --> 'com.android.support:support-fragment:27.1.1' --> 'android.arch.lifecycle:livedata-core:1.1.0' --> 'android.arch.core:common:1.1.0'
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.core:common' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.core:common' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.core:common' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.core:common' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0
        Constraint path 'bhsDriver:react-native-firebase:unspecified' --> 'android.arch.core:common' strictly '1.1.0' because of the following reason: debugRuntimeClasspath uses version 1.1.0

> Could not resolve android.arch.core:runtime:1.1.0.
  Required by:
      project :react-native-firebase
...