gpt4 book ai didi

android - 找不到方法 'org.gradle.api.artifacts.result.ComponentSelectionReason.getDescription()Ljava/lang/String;'

转载 作者:行者123 更新时间:2023-12-04 23:52:26 39 4
gpt4 key购买 nike

这是编译我的应用程序导入后显示的错误:
**无法找到方法 'org.gradle.api.artifacts.result.ComponentSelectionReason.getDescription()Ljava/lang/String;'。
此意外错误的可能原因包括:
Gradle 的依赖缓存可能已损坏(这有时会在网络连接超时后发生。)
重新下载依赖并同步项目(需要网络)
Gradle 构建过程(守护进程)的状态可能已损坏。停止所有 Gradle 守护程序可能会解决此问题。
停止 Gradle 构建过程(需要重新启动)
您的项目可能正在使用与项目中的其他插件或项目请求的 Gradle 版本不兼容的第三方插件。
在 Gradle 进程损坏的情况下,您也可以尝试关闭 IDE,然后杀死所有 Java 进程。**
build.gradle

    var = '4.0.1'
}

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




buildscript {

ext.versions = [
'compileSdk' : 30,
'targetSdk' : 30,
'fragment' : '2.3.5',
'core' : '1.6.0',
'butterknife' : '10.2.3',
'constraint' : '1.1.3',
'dagger' : '2.37',
'espresso' : '3.0.2',
'glide' : '4.12.0',
'gson' : '2.8.7',
'junit' : '4.13',
'leakcanary' : '1.6.3',
'lifecycle' : '1.1.1',
'mockito' : '1.10.19',
'powerMockito' : '1.6.2',
'hamcrest' : '1.3',
'okhttp' : '5.0.0-alpha.2',
'retrofit' : '2.9.0',
'room' : '1.1.1',
'runner' : '1.0.2',
'rxandroid' : '3.0.0',
'rxjava' : '3.0.13',
'supportlibrary' : '28.0.0',
'timber' : '4.7.1',
'firebase' : '22.0.0',
'youtube' : '2.1.0',
'exoplayer' : '2.11.7',
'stringcare_version' : '4.0.1',
]

repositories {
google()
mavenCentral()
gradlePluginPortal()
jcenter()
maven {
url 'https://maven.google.com'
}
maven {
url 'https://android-sdk.is.com/'
}

maven { url 'https://artifacts.applovin.com/android' }

}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.google.gms:google-services:4.3.10'
classpath "com.stringcare:plugin:${versions.stringcare_version}"
classpath "com.applovin.quality:AppLovinQualityServiceGradlePlugin:+"

}
}


allprojects {
repositories {
google()
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public'}
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven {
url "https://artifactory.appodeal.com/appodeal"
}
maven {
url 'https://android-sdk.is.com/'
}
maven {
url "https://dl.appnext.com/"
}


maven {
url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
credentials {
// Be sure to add these non-sensitive credentials in order to retrieve dependencies from
// the private repository.
username 'paypal_sgerritz'
password 'AKCp8jQ8tAahqpT5JjZ4FRP2mW7GMoFZ674kGqHmupTesKeAY2G8NcmPKLuTxTGkKjDLRzDUQ'
}
}
mavenLocal()



}
}

ext.versions2 = [
'api' : 'https://api.envato.com/v3/',
'api2' : 'https://api.yobdev.live/easyplex/api/'
]


task clean(type: Delete) {
delete rootProject.buildDir
}
应用程序\build.gradle
    var = '4.0.1'
}

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




buildscript {

ext.versions = [
'compileSdk' : 30,
'targetSdk' : 30,
'fragment' : '2.3.5',
'core' : '1.6.0',
'butterknife' : '10.2.3',
'constraint' : '1.1.3',
'dagger' : '2.37',
'espresso' : '3.0.2',
'glide' : '4.12.0',
'gson' : '2.8.7',
'junit' : '4.13',
'leakcanary' : '1.6.3',
'lifecycle' : '1.1.1',
'mockito' : '1.10.19',
'powerMockito' : '1.6.2',
'hamcrest' : '1.3',
'okhttp' : '5.0.0-alpha.2',
'retrofit' : '2.9.0',
'room' : '1.1.1',
'runner' : '1.0.2',
'rxandroid' : '3.0.0',
'rxjava' : '3.0.13',
'supportlibrary' : '28.0.0',
'timber' : '4.7.1',
'firebase' : '22.0.0',
'youtube' : '2.1.0',
'exoplayer' : '2.11.7',
'stringcare_version' : '4.0.1',
]

repositories {
google()
mavenCentral()
gradlePluginPortal()
jcenter()
maven {
url 'https://maven.google.com'
}
maven {
url 'https://android-sdk.is.com/'
}

maven { url 'https://artifacts.applovin.com/android' }

}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.google.gms:google-services:4.3.10'
classpath "com.stringcare:plugin:${versions.stringcare_version}"
classpath "com.applovin.quality:AppLovinQualityServiceGradlePlugin:+"

}
}


allprojects {
repositories {
google()
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public'}
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven {
url "https://artifactory.appodeal.com/appodeal"
}
maven {
url 'https://android-sdk.is.com/'
}
maven {
url "https://dl.appnext.com/"
}


maven {
url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
credentials {
// Be sure to add these non-sensitive credentials in order to retrieve dependencies from
// the private repository.
username 'paypal_sgerritz'
password 'AKCp8jQ8tAahqpT5JjZ4FRP2mW7GMoFZ674kGqHmupTesKeAY2G8NcmPKLuTxTGkKjDLRzDUQ'
}
}
mavenLocal()



}
}

ext.versions2 = [
'api' : 'https://api.envato.com/v3/',
'api2' : 'https://api.yobdev.live/easyplex/api/'
]


task clean(type: Delete) {
delete rootProject.buildDir
}
gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip
gradle.properties
# 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.org/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.useAndroidX=true
android.enableJetifier=true
org.gradle.jvmargs=-Xmx4096m
android.nonTransitiveRClass=true
org.gradle.daemon=true
org.gradle.parallel=true

# 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

最佳答案

我使用了最新的 Android Studio 版本,问题就解决了。

关于android - 找不到方法 'org.gradle.api.artifacts.result.ComponentSelectionReason.getDescription()Ljava/lang/String;',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70499402/

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