Сбой команды gradlew с кодом выхода 1 - PullRequest
0 голосов
/ 23 сентября 2019

Я получаю эту ошибку:

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all artifacts for configuration ':app:debugRuntimeClasspath'.
   > Could not find legacy-support-core-utils.jar (androidx.legacy:legacy-support-core-utils:1.0.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/androidx/legacy/legacy-support-core-utils/1.0.0/legacy-support-core-utils-1.0.0.jar

После запуска: tns run android --bundle Вот мой packages.json:

    "tns-android": {
      "version": "6.1.1"
    }
  },
  "dependencies": {
    "@nstudio/nativescript-cardview": "^1.0.0",
    "@nstudio/nativescript-checkbox": "^1.0.0",
    "@vue/devtools": "^5.0.6",
    "axios": "^0.19.0",
    "nativescript-facebook": "^4.2.0",
    "nativescript-iqkeyboardmanager": "^1.5.1",
    "nativescript-plugin-firebase": "^10.0.0",
    "nativescript-socketio": "^3.3.1",
    "nativescript-theme-core": "^2.0.17",
    "nativescript-toasty": "^2.0.1",
    "nativescript-videoplayer": "^4.2.1",
    "nativescript-vue": "^2.4.0",
    "nativescript-vue-devtools": "^1.2.0",
    "tns-core-modules": "^6.1.0",
    "vuex": "^3.0.1"
  },
  "devDependencies": {
    "@babel/core": "^7.6.0",
    "@babel/preset-env": "^7.6.0",
    "babel-loader": "^8.0.2",
    "babel-traverse": "6.26.0",
    "babel-types": "6.26.0",
    "babylon": "6.18.0",
    "clean-webpack-plugin": "^0.1.19",
    "copy-webpack-plugin": "^4.5.2",
    "css-loader": "^1.0.0",
    "lazy": "1.0.11",
    "nativescript-dev-webpack": "~1.2.0",
    "nativescript-vue-template-compiler": "^2.0.0",
    "nativescript-worker-loader": "~0.9.0",
    "node-sass": "^4.9.2",
    "sass-loader": "^7.1.0",
    "terser-webpack-plugin": "^1.1.0",
    "vue-loader": "^15.2.6",
    "webpack": "^4.16.4",
    "webpack-bundle-analyzer": "~2.13.1",
    "webpack-cli": "^3.3.8"
  }

Мой файл build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    def initialize = { ->
        def userDir = "${rootProject.projectDir}/../.."
        apply from: "$rootDir/user_properties_reader.gradle"
        apply from: "$rootDir/paths.gradle"
        rootProject.ext.userDefinedGradleProperties = getUserProperties("${getAppResourcesPath(userDir)}/Android")
    }
    initialize()

    def computeKotlinVersion = { -> project.hasProperty("kotlinVersion") ? kotlinVersion : "1.3.41"
    }
    def kotlinVersion = computeKotlinVersion()

    repositories {
        google()
        jcenter()
        maven { url "https://maven.fabric.io/public" }
        maven { url "https://dl.bintray.com/android/android-tools" }
 }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.0'
        classpath "com.google.gms:google-services:4.3.0"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
        classpath "io.fabric.tools:gradle:1.26.1"
 }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
    beforeEvaluate { project ->
        if (rootProject.hasProperty("userDefinedGradleProperties")) {
            rootProject.ext.userDefinedGradleProperties.each { entry ->
                def propertyName = entry.getKey()
                def propertyValue = entry.getValue()
                project.ext.set(propertyName, propertyValue)
            }
        }

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
...