I updated my targetSDKVersion and compileSdkVersion from 30 to 32, but now when I'm running the app, app:KaptDebugKotlin is failing. I used the debug-option to get more details and I'm receiving this error:
My build.gradle (module) file:
android {
compileSdkVersion 32
buildToolsVersion '29.0.3'
defaultConfig {
applicationId "com.eschbachit.petrolinemobile"
minSdkVersion 22
targetSdkVersion 32
versionCode 1628
versionName "2.3.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
dataBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
mavenCentral()
}
And this is my build.gradle (project) file:
buildscript {
ext.kotlin_version = '1.4.20-M1'
repositories {
jcenter()
google()
maven { url 'https://dl.bintray.com/kotlin/kotlin-eap' }
}
ext {
compiler_version = '3.1.3'
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
classpath 'com.google.gms:google-services:4.3.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "com.android.tools.build:gradle:$compiler_version"
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
}
My distributionURL is: distributionUrl=https://services.gradle.org/distributions/gradle-6.1.1-bin.zip
I tried different solutions from other answers but nothing worked for me
EDIT: This answer https://stackoverflow.com/a/69250502/15352563 solved my issue! If anybody have the same issue, this might help