gpt4 book ai didi

java - 找不到 : org. gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo(java.lang.String) 的匹配构造函数

转载 作者:行者123 更新时间:2023-11-30 12:06:28 29 4
gpt4 key购买 nike

我正在开发一个 Android Studio 项目,今天当我打开它时,突然出现了这种情况。

找不到匹配的构造函数: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

应用级渐变

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
}

最佳答案

我意识到是 OneSignal 导致了这个问题。我已经通过删除整个 OneSignal 来“解决”这个问题,因为我不再使用它了。

关于java - 找不到 : org. gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo(java.lang.String) 的匹配构造函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55548505/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com