How to implement guide with gradle dependency conflict leading to classnotfoundexception in android 14
I've searched everywhere and can't find a clear answer... I'm working with a `ClassNotFoundException` behavior when trying to run my Android app on a device with Android 14. The stack trace points to a missing class from a library Iβve added as a dependency. I suspect this might be due to conflicting versions of dependencies in my `build.gradle` file. Hereβs what my `build.gradle` looks like: ```groovy dependencies { implementation 'com.squareup.retrofit2:retrofit:2.9.0' implementation 'com.squareup.retrofit2:converter-gson:2.9.0' implementation 'androidx.appcompat:appcompat:1.6.0' implementation 'com.google.code.gson:gson:2.8.9' implementation 'com.squareup.okhttp3:okhttp:4.10.0' } ``` When I try to run the app, I get the following behavior: ``` java.lang.ClassNotFoundException: Didn't find class 'com.squareup.retrofit2.Retrofit' on path: DexPathList ``` Iβve already tried cleaning the project and rebuilding, but the scenario continues. I also checked for dependency conflicts using the `./gradlew app:dependencies` command, and it shows that `gson` is being resolved to version 2.8.9, which should be fine. However, I noticed that when I included another library that uses Retrofit, it pulls in `retrofit:2.8.0`, which might be causing the conflict. To resolve this, I attempted to enforce the Retrofit version by adding: ```groovy implementation ('com.squareup.retrofit2:retrofit:2.9.0') { force = true } ``` Despite this, the question still remains. Am I missing something? How can I effectively resolve this dependency conflict and ensure that all libraries are using the correct versions, especially when targeting Android 14? My development environment is Windows. Any help would be greatly appreciated!