找不到与以下对象匹配的构造函数:org.gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo(java.lang.String) [英] Could not find matching constructor for: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo(java.lang.String)

查看:158
本文介绍了找不到与以下对象匹配的构造函数:org.gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo(java.lang.String)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个Android Studio项目,而今天,当我突然打开它时,这种情况就开始发生了.

I'm working on an Android Studio project and today when i opened it up all of a sudden this started happening.

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

我已经尝试过更改gradle版本,但是没有任何效果.另外,我尝试了经典的清理项目",重建项目"和使缓存无效并重新启动"

I've already tried to change the gradle versions around but nothing works. Also, I've tried the classic "clean project", "rebuild project" and "invalidate caches and restart"

gradle.properties

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

project level 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
}

推荐答案

我意识到OneSignal引起了问题.我已经通过整体上删除OneSignal来解决"了这个问题,因为我不再使用它了.

I realised that OneSignal was causing the issue. I have "solved" this by removing OneSignal as a whole as I wasn't using that anymore.

这篇关于找不到与以下对象匹配的构造函数:org.gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo(java.lang.String)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆