I’m new to the DHIS2 Android ecosystem and recently started maintaining an existing DHIS2-based Android app that was previously developed by someone else. The app is based on the DHIS2 Android Capture App v2.9.
We encountered a bug in the app, and I need to rebuild it to start debugging. However, when I try to build the project, I’m facing the following issue:
Could not resolve all files for configuration ‘:commons:debugCompileClasspath’.
org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ‘:commons:debugCompileClasspath’.
org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find de.adorsys.android:securestoragelibrary:1.2.2.
Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find de.adorsys.android:securestoragelibrary:1.2.2.
Could not find de.adorsys.android:securestoragelibrary:1.2.2.
Required by:
project :commons
That dependency was removed from the project because it is no longer maintained by the developer and was never migrated to Maven Central. You have two options to fix this:
Use jcenter() to search for and resolve the dependency.
Remove/Replace the dependency and modify the PreferenceProvider class where it is being used.
If you choose the first option, ensure your project’s build.gradle file includes the JCenter repository and explicitly allows the module:
This configuration should allow Gradle to search for the dependency in JCenter.
However, we recommend removing the library from the project or finding a suitable replacement, as it’s no longer maintained. Since the library is only used in the PreferenceProvider class, it should be relatively straightforward to remove or replace.
Hi @FerdyR
I tried with jcenter() as well as recommend approach but got Errors.
I’m attaching the Screenshot of the error that I got with jcenter()
Possible causes: Your project may be using a version of the Android Gradle plug-in that does not contain the method (e.g. ‘testCompile’ was added in 1.1.0).
What I’ve Tried:
I tried to Upgrade plugin to version 8.2.2 but that is also not working.
Hi @Mohd_Nawaz, sorry for the late reply. Are you still having the issue? If so, I would recommend to remove the dependency from the project. It’s fairly easy to do it.