Не удалось найти соответствующий конструктор для: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo (java.lang.String) - PullRequest
1 голос
/ 06 апреля 2019

Я работаю над проектом Android Studio, и сегодня, когда я неожиданно открыл его, это начало происходить.

Could not find matching constructor for: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo(java.lang.String)

Я уже пытался изменить версии Gradle, но ничего не работает. Кроме того, я попробовал классические «чистый проект», «перестроить проект» и «аннулировать кэши и перезапустить»

gradle.properties

# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.or   g/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx512m
# When configured, Gradle will  run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

Уровень приложения Gradle

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.25.4'
    }



}
plugins {
    id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.7.0'
}
apply plugin: 'com.android.application'
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'

android {
    dataBinding {
        enabled = false
    }
    compileSdkVersion 28
    buildToolsVersion '28.0.3'
    defaultConfig {
        applicationId "com.virtualflight.VirtualHub"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 58
        versionName "4.0.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
        android {

            vectorDrawables.useSupportLibrary = true
            defaultConfig.applicationId="com.virtualflight.VirtualHub"
            defaultConfig {

                manifestPlaceholders = [onesignal_app_id: "977e8aef-4b31-4d36-91e4-2555572b9efe",
                                        // Project number pulled from dashboard, local value is ignored.
                                        onesignal_google_project_number: "REMOTE"]
            }
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        customDebugType {
            debuggable true
        }

    }
    productFlavors {
    }
    compileOptions {
        sourceCompatibility = '1.8'
        targetCompatibility = '1.8'
    }
}




repositories {
    mavenCentral()
    maven { url 'https://maven.fabric.io/public' }


}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1-alpha01', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    //Google dependencies bellow
    implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.intuit.sdp:sdp-android:1.0.6'
    implementation 'com.sothree.slidinguppanel:library:3.4.0'


    testImplementation 'junit:junit:4.12'
    //Mapbox dependencies bellow
    implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:6.8.1'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-services:2.1.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-java-core:2.1.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-java-services:2.1.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-java-services-rx:2.1.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-services:2.1.0'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-telemetry:3.5.7'
    implementation 'com.mapbox.mapboxsdk:mapbox-android-ui:2.1.0'

    implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
        transitive = true;
    }
    implementation files('libs/volley.jar')
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'com.github.barteksc:android-pdf-viewer:3.1.0-beta.1'
    implementation 'com.karumi:dexter:5.0.0'
    implementation 'com.android.support:support-v4:28.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.android.material:material:1.1.0-alpha04'
    implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'

    implementation 'com.github.AppIntro:AppIntro:v5.1.0'
    implementation 'androidx.cardview:cardview:1.0.0'
}

Уровень проекта Gradle


buildscript {
    ext.kotlin_version = '1.2.51'
    repositories {
        jcenter()

        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}




allprojects {
    repositories {
        google()
        maven { url "https://jitpack.io" }
        jcenter()
        google()
    }
}

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

1 Ответ

0 голосов
/ 06 апреля 2019

Я понял, что OneSignal вызывает проблему.Я «решил» это, удалив OneSignal в целом, так как больше не использовал его.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...