I'm trying to list my project's libraries to see nested dependencies while trying to solve a dependency clash/collision issue and I'm getting this error which you can see in the screenshot.
I tried some things which I saw on the internet but none of them seemed to change a thing.
So basically when I run ./gradlew app:dependencies
I get:
"Could not resolve all files for configuration ':classpath'."
Gradle is a powerful tool but honestly I cannot wrap around my head its directory structure, its dozens of setting files, its fastly evolving new versions and its complex hierarchy and dependency system which nests inside Android development interconnected with Java, Android Studio and as well with my project.
It was always a "Well they say I should add this line, let's see if it helps or not" thing for me. It is like a magical perpetual motion machine when it works as long as it doesn't, without changing the slightest thing in my project.
Please help if you can.
Contents of build.gradle file:
plugins {
id 'com.android.application' version '7.4.0' apply false
id 'com.android.library' version '7.4.0' apply false
id 'org.jetbrains.kotlin.android' version '1.8.20-Beta' apply false
}
Contents of build.gradle file which magically has the same f. name:
//module/app level
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.myapp.package.here'
compileSdk 33
buildFeatures{
viewBinding true
}
defaultConfig {
applicationId "com.myapp.package.here"
minSdk 24
targetSdk 33
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 'com.google.android.material:material:1.8.0'
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.0.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
testImplementation 'junit:junit:4.13.2'
}