0

Since I updated Android Studio to version 4.2, I have a new project that gives me this error when I try to run it:

Task 'getting' not found in root project 

Do you have any idea of the origin please? EDIT add both gradle: That is my first gradle

plugins {
    id 'com.android.application'
    id 'kotlin-android'
}

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.example.morinflorian_cryptocurrency"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.2'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation 'com.squareup.okhttp3:okhttp:3.12.0'
    implementation 'org.drewcarlson:coingecko:0.1.10'
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.0-RC'

    implementation 'org.jetbrains:annotations:20.1.0'
    implementation 'io.ktor:ktor-io:1.5.3'
    implementation 'io.ktor:ktor-utils:1.5.3'
    implementation 'io.ktor:ktor-http:1.5.3'
    implementation 'io.ktor:ktor-http-cio:1.5.3'
    implementation 'org.jetbrains.kotlinx:atomicfu:0.15.2'
    implementation 'io.ktor:ktor-client-core:1.5.3'
    implementation 'org.jetbrains.kotlin:kotlin-stdlib'
}

And the secound:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext.kotlin_version = "1.5.0"
    repositories {
        google()
        mavenCentral()

    }
    dependencies {
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0"
        classpath 'com.android.tools.build:gradle:4.2.0'
        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()
        mavenCentral()

    }
}

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

I don't find any call of getting, its possible the problem it's in the other file ? And it's a new project, I just add some dependencies.

Hikachu
  • 302
  • 1
  • 9

0 Answers0