AAPT: error: resource string/content_pro vider (aka com.dhis2:string/content_provider) not found

Task :dhis2-rule-engine:compileJava FAILED

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:processDhisDebugResources’.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
D:\app\dhis2-android-capture-app\now\dhis2-android-capture-app\app\src\main\AndroidManifest.xml:106:9-114:20: AAPT: error: resource string/content_pro
vider (aka com.dhis2:string/content_provider) not found.

Hi @lin_xd ,

Regarding the rule engine:
Depending on the branch you want to build the rule engine needs a build.gradle file. You can check its github repository and copy it.

The problem with the content provider seems to be a missing file. Can you check that the app build.gradle file defines resValue "string", "content_provider", "com.dhis2.xxx.provider" for each buildVariant? If so, add this and change xxx with the proper buildVariant name.