Dhis capture app build failed: error: resource drawable/ic_clinical_f_outline (aka com.dhis2.alpha:drawable/ic_clinical_f_outline) not found

Task :app:processDhisAlphaResources FAILED

FAILURE: Build failed with an exception.

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

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
D:\app\dhis2-android-capture-app\master\dhis2-android-capture-app-2.0.1\app\src\main\res\layout\activity_dataset_initial.xml:78: AAPT: error: resource
drawable/ic_clinical_f_outline (aka com.dhis2.alpha:drawable/ic_clinical_f_outline) not found.

 D:\app\dhis2-android-capture-app\master\dhis2-android-capture-app-2.0.1\app\src\main\res\layout\activity_dataset_table.xml:201: AAPT: error: resource

drawable/ic_clinical_f_outline (aka com.dhis2.alpha:drawable/ic_clinical_f_outline) not found.

 D:\app\dhis2-android-capture-app\master\dhis2-android-capture-app-2.0.1\app\src\main\res\layout\activity_event_initial.xml:121: AAPT: error: resource

drawable/ic_clinical_f_outline (aka com.dhis2.alpha:drawable/ic_clinical_f_outline) not found.

 D:\app\dhis2-android-capture-app\master\dhis2-android-capture-app-2.0.1\app\src\main\res\layout\activity_event_scheduled.xml:98: AAPT: error: resource

drawable/ic_clinical_f_outline (aka com.dhis2.alpha:drawable/ic_clinical_f_outline) not found.

 D:\app\dhis2-android-capture-app\master\dhis2-android-capture-app-2.0.1\app\src\main\res\layout\activity_splash.xml:14: AAPT: error: resource drawable

/sierra_leone (aka com.dhis2.alpha:drawable/sierra_leone) not found.

 D:\app\dhis2-android-capture-app\master\dhis2-android-capture-app-2.0.1\app\src\main\res\layout\filter_status.xml:68: AAPT: error: resource drawable/i

c_calendar_positive (aka com.dhis2.alpha:drawable/ic_calendar_positive) not found.

 D:\app\dhis2-android-capture-app\master\dhis2-android-capture-app-2.0.1\app\src\main\res\layout\item_program_stage.xml:27: AAPT: error: resource drawa

ble/ic_clinical_f_outline (aka com.dhis2.alpha:drawable/ic_clinical_f_outline) not found.

 D:\app\dhis2-android-capture-app\master\dhis2-android-capture-app-2.0.1\app\src\main\res\layout-land\activity_event_initial.xml:129: AAPT: error: reso

urce drawable/ic_clinical_f_outline (aka com.dhis2.alpha:drawable/ic_clinical_f_outline) not found.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 16m 2s
187 actionable tasks: 187 executed

Hi @lin_xd, this is a good question for the #development:sdk-android-development channel, so I’m going to move it there. Copying @jose and @marta who should be able to point you in the right direction.

Hi @lin_xd,
The android app has several buildVariants, but we know some of them could have problems (for example the alpha one you are trying to build).
I would recommend using release or debug as those are the most updated configurations we have.

run : gradlew bundleDebug -x test:
Got this

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
D:\app\cap\dev\app\build\intermediates\bundle_manifest\dhisDebug\processDhisDebugManifest\bundle-manifest\AndroidManifest.xml:153: AAPT: error: r
esource string/content_provider (aka com.dhis2:string/content_provider) not found
=============================
run : gradlew bundleRelease -x test
Got this:

Task :app:kaptGenerateStubsDhisReleaseKotlin FAILED
e: java.lang.IllegalStateException: SimpleTypeImpl should not be created for error type: ErrorScope{Error scope for class with arguments
: org.jetbrains.kotlin.types.IndexedParametersSubstitution@580e251c}
[ERROR : Response]
at org.jetbrains.kotlin.types.SimpleTypeImpl.(KotlinTypeFactory.kt:137)
at org.jetbrains.kotlin.types.KotlinTypeFactory.simpleTypeWithNonTrivialMemberScope(KotlinTypeFactory.kt:71)
at org.jetbrains.kotlin.types.KotlinTypeFactory.simpleType(KotlinTypeFactory.kt:54)
at org.jetbrains.kotlin.types.TypeSubstitutionKt.replace(TypeSubstitution.kt:141).

Hello,sir.
This is the error for gradlew assembleRelease :smile:

Task :app:kaptGenerateStubsDhisReleaseKotlin FAILED
e: java.lang.IllegalStateException: SimpleTypeImpl should not be created for error type: ErrorScope{Error scope for class with arguments
: org.jetbrains.kotlin.types.IndexedParametersSubstitution@42312c55}
[ERROR : Response]
at org.jetbrains.kotlin.types.SimpleTypeImpl.(KotlinTypeFactory.kt:137)
at org.jetbrains.kotlin.types.KotlinTypeFactory.simpleTypeWithNonTrivialMemberScope(KotlinTypeFactory.kt:71)
at org.jetbrains.kotlin.types.KotlinTypeFactory.simpleType(KotlinTypeFactory.kt:54)
at org.jetbrains.kotlin.types.TypeSubstitutionKt.replace(TypeSubstitution.kt:141)
at org.jetbrains.kotlin.types.TypeSubstitutionKt.replace(TypeSubstitution.kt:126)
at org.jetbrains.kotlin.types.TypeSubstitutionKt.replace$default(TypeSubstitution.kt:118)
at org.jetbrains.kotlin.kapt3.KaptAnonymousTypeTransformer.convertPossiblyAnonymousType(KaptAnonymousTypeTransformer.kt:64)
at org.jetbrains.kotlin.kapt3.KaptAnonymousTypeTransformer.convertPossiblyAnonymousType(KaptAnonymousTypeTransformer.kt:61)
at org.jetbrains.kotlin.kapt3.KaptAnonymousTypeTransformer.transformAnonymousType(KaptAnonymousTypeTransformer.kt:24)

error: string too large to encode using UTF-8 written instead as ‘STRING_TOO_LARGE’.

FAILURE: Build failed with an exception.

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

Internal compiler error. See log for more details

Task :app:kaptGenerateStubsDhisDebugKotlin FAILED

FAILURE: Build failed with an exception.

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

Internal compiler error. See log for more details

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org