Error building the app

Dear @dhis2-android,

I have received this question through email and want to post it here so that the answer can also be public

When I open the app in android studio and then run it, a message shows that says ("BUILD FAILED. API ‘variant.getMappingFile()’ is obsolete and has been replaced with ‘variant.getMappingFileProvider()’. ).

What should I do? The app didn’t run.


First of all, to start working with the project you will need:

  • Android Studio (3.6.X)
  • A Git client

The android app repository has two submodules that have to be cloned as well so the best way to start working is using git commands from the folder you want the project to be downloaded:

You can change the github url to your own fork if needed.

Now you can open the project in android studio and launch the app.

If you try to download the project directly from github or using android studio the submodules won’t be there and the build process will fail. If that is the case, then you may need to use git submodule init and git submodule update and you will need to check what branches for each submodule you need to checkout.