Android 编译时出错:错误:原因:未指定compileSdkVersion

Android 编译时出错:错误:原因:未指定compileSdkVersion,android,firebase,gradle,android-gradle-plugin,Android,Firebase,Gradle,Android Gradle Plugin,我想编译我的android studio项目,但不知怎的,我在firebase crashalytics中遇到了一个错误。所以我试图解决这个问题 我现在所拥有的: buildscript { repositories { ... maven { url = "https://maven.fabric.io/public" } } dependencies { ... classpath "io.fabric.

我想编译我的android studio项目,但不知怎的,我在firebase crashalytics中遇到了一个错误。所以我试图解决这个问题

我现在所拥有的:

buildscript {
    repositories {
        ...
        maven { url = "https://maven.fabric.io/public" }
    }
    dependencies {
        ...
        classpath "io.fabric.tools:gradle:1.25.1"
    }
}
apply plugin: 'com.android.feature'
apply plugin: 'io.fabric'
从我在网上读到的资料来看,到目前为止还不错,理论上应该是这样。但是我现在得到一个错误,
error:Cause:compileSdkVersion没有指定。
所以我搜索了这个错误,但是我在网上找到的关于
compileSdkVersion
targetSdkVersion
的所有解决方案都不同

compileSdkVersion 29

buildToolsVersion '29.0.2'
defaultConfig {
    applicationId 'ch.workouttracker'
    minSdkVersion 24
    targetSdkVersion 29
    versionCode 11
    versionName '0.7.6'
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    resConfigs "de" // And any other languages you support
}

所以这里不是这样,我还应该尝试什么呢?

是否在
android
块下编译dkversion?是的,android元素包含此块请添加完整的
build.gradle
以再次调查编译。但我不知道为什么。所以我不能帮助那些来自谷歌的人,你发布完整的
build.gradle
有什么问题吗?