I am having an issue when I try to run the app. This is what I get when I build the project:
And this when I try to run:
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.
I am wondering if the wiki-pages are up-to-date? (the commenting/un-commenting)
Hope to get some help here
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 also check the ruleEngine version in the dependencies.gradle file is 188.8.131.52-SNAPSHOT.
Alright, I moved it to this to the correct one. @Pablo
The dependency you mentioned was commented out. So when I un-comment it, I get another error now.:
I think I am on 2.0.0_beta. I think so…
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.
implementiation project(':dhis2-rule-engine') and
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:
If so, in the VCS tab (check previous image). Click in Update Project. That will update everything.
Hi again @Pablo
I have updated the project yesterday. I did it again now, but it still did not seem to work. The gradle file for app looks like this now:
The remotes you asked for:
And the braches:
However, I am still getting an error:
Gosh, am stuck!
Don’t worry, we are almost there.
I’m sure you are not in the correct 2.0.0_beta branch, cause this is the build.gradle we have right now in that branch:
Make sure to check out the 2.0.0_beta branch from the dhis2-app remote. You can also try to do a pull from that branch.