https://kotlinlang.org logo
k

knthmn

06/03/2021, 4:33 AM
I am getting
Cannot get version candidates with an empty fetchers list.
Details in thread
Using Gradle 7.0.2 I applied the plugin in
settings.gradle.kts
Copy code
plugins {
    id("de.fayard.refreshVersions") version "0.10.0"
}
In my
app/build.gradle.kts
, I changed the following just to try it out
Copy code
// before:   implementation("androidx.core:core-ktx:1.5.0")
implementation(AndroidX.core.ktx)
l

louiscad

06/03/2021, 9:21 AM
Do you have a minimal reproducing project or something that could help us understand why that is happening exactly?
k

knthmn

06/03/2021, 9:27 AM
I tried it on a barebone project and I got the same error The No Activity template created by AS Arctic Fox beta 3
build.gradle.kts
Copy code
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:7.0.0-beta03")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10")

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

tasks.register("clean", Delete::class) {
    delete(rootProject.buildDir)
}
build.gradle.kts (:app)
Copy code
plugins {
    id("com.android.application")
    id("kotlin-android")
}

android {
    compileSdk = 30
    buildToolsVersion = "30.0.3"

    defaultConfig {
        applicationId = "com.github.knthmn.myapplication"
        minSdk = 23
        targetSdk = 30
        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            isMinifyEnabled = false
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "<http://proguard-rules.pro|proguard-rules.pro>"
            )
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }
}

dependencies {
    implementation("androidx.core:core-ktx:_")
    implementation("androidx.appcompat:appcompat:1.3.0")
    implementation("com.google.android.material:material:1.3.0")
    testImplementation("junit:junit:4.+")
    androidTestImplementation("androidx.test.ext:junit:1.1.2")
    androidTestImplementation("androidx.test.espresso:espresso-core:3.3.0")
}
gradle-wrapper.properties
Copy code
#Thu Jun 03 17:22:30 CST 2021
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
settings.gradle.kts
Copy code
plugins {
    id("de.fayard.refreshVersions") version "0.10.0"
}

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter() // Warning: this repository is going to shut down soon
    }
}
rootProject.name = "My Application"
include(":app")
l

louiscad

06/03/2021, 9:29 AM
Ooooh I see, might be that we don't support
dependencyResolutionManagement
yet. Can you try using
allprojects { }
instead to see if it'll fix it first?
k

knthmn

06/03/2021, 9:31 AM
same error, here is the full stack trace https://pastebin.com/FRXAmtQb
l

louiscad

06/03/2021, 9:31 AM
Can you use "text snippet" in Slack ( icon) instead of linking externally?
k

knthmn

06/03/2021, 9:32 AM
l

louiscad

06/03/2021, 9:35 AM
A zip or GitHub link to a minimal reproducer would be helpful to me, can you do it please?
k

knthmn

06/03/2021, 9:39 AM
Thanks for your help
l

louiscad

06/03/2021, 9:42 AM
You didn't set any repos in the same project. I told you to replace
dependencyResolutionManagement
with
allprojects
(so in
build.gradle.kts
), not to ditch the repos altogether.
k

knthmn

06/03/2021, 9:56 AM
My bad I forgot to add the
repositories
back to
allprojects
when I tried it. It works now. Thank you
15 Views