Невозможно разрешить зависимость для ': battery-android @ debug / compileClasspath' - PullRequest
1 голос
/ 09 октября 2019

Я новое гибридное приложение и создаю приложение на Angular с использованием ionic-5.4.1 и android studio 3.5 с конденсаторной платформой.

Я получаю ошибку ниже во время gradle-синхронизации. Я пытался добавить URL репозитория Google Maven, но все еще получал то же самое.

 maven {
            url "https://maven.google.com"
        }

Пожалуйста, помогите, что мне не хватает.

ERROR: Unable to resolve dependency for ':capacitor-android@debug/compileClasspath': Could not resolve org.apache.cordova:framework:7.0.0.
Affected Modules: capacitor-android

ERROR: Unable to resolve dependency for ':capacitor-android@debug/compileClasspath': Could not resolve com.google.auto.value:auto-value-annotations:1.6.3.
Affected Modules: capacitor-android

ERROR: Unable to resolve dependency for ':capacitor-android@debugAndroidTest/compileClasspath': Could not resolve org.apache.cordova:framework:7.0.0.
Affected Modules: capacitor-android

ERROR: Unable to resolve dependency for ':capacitor-android@debugAndroidTest/compileClasspath': Could not resolve junit:junit:4.12.
Affected Modules: capacitor-android

ERROR: Unable to resolve dependency for ':capacitor-android@debugAndroidTest/compileClasspath': Could not resolve com.squareup:javawriter:2.1.1.
Affected Modules: capacitor-android

ERROR: Unable to resolve dependency for ':capacitor-android@debugAndroidTest/compileClasspath': Could not resolve org.hamcrest:hamcrest-library:1.3.
Affected Modules: capacitor-android

ERROR: Unable to resolve dependency for ':capacitor-android@debugAndroidTest/compileClasspath': Could not resolve org.hamcrest:hamcrest-integration:1.3.
Affected Modules: capacitor-android

ERROR: Unable to resolve dependency for ':capacitor-android@debugAndroidTest/compileClasspath': Could not resolve com.google.code.findbugs:jsr305:2.0.1.
Affected Modules: capacitor-android

ERROR: Unable to resolve dependency for ':capacitor-android@debugAndroidTest/compileClasspath': Could not resolve com.google.auto.value:auto-value-annotations:1.6.3.
Affected Modules: capacitor-android

ERROR: Unable to resolve dependency for ':capacitor-android@debugUnitTest/compileClasspath': Could not resolve org.apache.cordova:framework:7.0.0.
Affected Modules: capacitor-android

ERROR: Unable to resolve dependency for ':capacitor-android@debugUnitTest/compileClasspath': Could not resolve com.google.auto.value:auto-value-annotations:1.6.3.
Affected Modules: capacitor-android

ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve junit:junit:4.12.
Affected Modules: app

ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.squareup:javawriter:2.1.1.
Affected Modules: app

ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve org.hamcrest:hamcrest-library:1.3.
Affected Modules: app

ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve org.hamcrest:hamcrest-integration:1.3.
Affected Modules: app

ERROR: Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.google.code.findbugs:jsr305:2.0.1.
Affected Modules: app

ERROR: Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve junit:junit:4.12.

Affected Modules: app
ERROR: Unable to resolve dependency for ':capacitor-cordova-android-plugins@debug/compileClasspath': Could not resolve org.apache.cordova:framework:7.0.0.

Affected Modules: capacitor-cordova-android-plugins

ERROR: Unable to resolve dependency for ':capacitor-cordova-android-plugins@debugAndroidTest/compileClasspath': Could not resolve org.apache.cordova:framework:7.0.0.
Affected Modules: capacitor-cordova-android-plugins

ERROR: Unable to resolve dependency for ':capacitor-cordova-android-plugins@debugUnitTest/compileClasspath': Could not resolve org.apache.cordova:framework:7.0.0.
Affected Modules: capacitor-cordova-android-plugins

build.gradle (проект: android)

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'
        classpath 'com.google.gms:google-services:4.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

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

build.gradle (Модуль: конденсатор-андроид)

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'
        classpath 'com.novoda:bintray-release:0.9.1'
    }
}

tasks.withType(Javadoc).all { enabled = false }

apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'

android {
    compileSdkVersion 28
    defaultConfig {
        minSdkVersion 21
        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'
        }
    }
    lintOptions {
        abortOnError false
    }
}

repositories {
    google()
    jcenter()
    mavenCentral()
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:support-compat:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:customtabs:28.0.0'
    implementation 'com.google.firebase:firebase-messaging:18.0.0'
    //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 'org.apache.cordova:framework:7.0.0'
}

def version = System.getenv("BINTRAY_PKG_VERSION")

publish {
    userOrg = 'ionic-team'
    repoName = 'capacitor'
    groupId = 'ionic-team'
    artifactId = 'capacitor-android'
    if (version != null) {
        publishVersion = System.getenv("BINTRAY_PKG_VERSION")
    } else {
        publishVersion = '0.0.0'
    }
    desc = 'Capacitor Android Runtime'
    website = 'https://github.com/ionic-team/capacitor'
}

...