Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/kotlin/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android studio 自AndroidStudio 4.2以来启动应用程序时出错_Android Studio_Kotlin - Fatal编程技术网

Android studio 自AndroidStudio 4.2以来启动应用程序时出错

Android studio 自AndroidStudio 4.2以来启动应用程序时出错,android-studio,kotlin,Android Studio,Kotlin,自从我将Android Studio更新为4.2版以来,我有一个新项目,当我尝试运行它时会出现以下错误: Task 'getting' not found in root project 请问你知道它的产地吗? 编辑并添加两个渐变: 这是我的第一次毕业 plugins { id 'com.android.application' id 'kotlin-android' } android { compileSdkVersion 30 buildToolsVe

自从我将Android Studio更新为4.2版以来,我有一个新项目,当我尝试运行它时会出现以下错误:

Task 'getting' not found in root project 
请问你知道它的产地吗? 编辑并添加两个渐变: 这是我的第一次毕业

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'
}
和第二声:

// 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
}

我找不到电话,可能是另一个文件有问题吧?这是一个新项目,我只是添加了一些依赖项。

您已经声明了名为
获取的任务
所以您可以发布两个gradle文件吗