I saw someone posted a similar issue few days ago. I tried the suggestion given by @Pablo on that topic, but that did not help me. I am still getting the same error.
I have also tried all the usual things we always try: clean/rebuild, restart etc.
This post should be at Development/SDK- Android Development. Don’t know if it can be moved…
Can you tell me the branch are you trying to build the project? Is it master?
From the images, i would say the problem is the rule engine library. Make sure that your app build.gradle is using the correct rule engine dependency:
And yes, I have the version you mentioned.
Moreover, I tried to comment/uncomment as the wiki-pages saya. And then something else that my fellow students suggested me to. Currently I have something like this in the build.gradle file:
Ok, i think you are not in the latest 2.0.0_beta branch, that build.gradle file has changed a little bit. You should update the project with last changes in the main DHIS2 repository.
But if you are using like that the build.gradle, you are trying to build the project with duplicated dependencies for the rule engine.
Using the 2.0.0_beta branch. Uncommentimplementiation project(':core') Commentimplementiation project(':dhis2-rule-engine') and implementation("org.hisp.dhis:android-core${libraries.dhis2sdk}"){...}
This way you should also check that you are in using the develop branch for the sdk.
Try this but I think you have to update the whole project. Did you fork it or just cloned it? Let me see what remotes do you have. You can can find them here:
Under dhi2-android-capture-app you should have this remote: git@github.com:dhis2/dhis2-android-capture-app.git
or https://github.com/dhis2/dhis2-android-capture-app.git
If so, in the VCS tab (check previous image). Click in Update Project. That will update everything.