When I updated Android Studio to Flamingo version, Gradle suggested the upgrade and I upgraded with AGP from 7.4 to 8.0. I was never able to debug after this upgrade, and as a result of my research, I could not come to a conclusion. If there is any information I have given missing for the problem, if you specify, I can make additions. I'm sharing my gradle module app codes because I think the problem stems from here.
My build.gradle(app):
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion 33
defaultConfig {
applicationId "com.example.packagename"
multiDexEnabled true
minSdkVersion 22
targetSdkVersion 33
versionCode 15
versionName "1.4"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = '11'
}
namespace 'com.example.packagename'
}
Error:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> superclass access check failed: class butterknife.compiler.ButterKnifeProcessor$RScanner (in unnamed module @0x1db9193f) cannot access class com.sun.tools.javac.tree.TreeScanner (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.tree to unnamed module @0x1db9193f
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileDebugJavaWithJavac'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:149)
.
.
.
I tried almost all the suggestions mentioned in StackOverFlow for solution but couldn't reach a solution.