Error when building Android capture App build in android studio

Hello,

When I try to build Android capture App in android studio (Windows),

I’m getting this error when doing assembleDebug:

C:\Users\lenovo\Desktop\Android App DHIS2\V2\dhis2-android-capture-app\commons\build\generated\source\kapt\debug\org\dhis2\commons\dialogs\calendarpicker\CalendarPicker_MembersInjector.java:4: error: package javax.annotation.processing does not exist
import javax.annotation.processing.Generated;
                                  ^
C:\Users\lenovo\Desktop\Android App DHIS2\V2\dhis2-android-capture-app\commons\build\generated\source\kapt\debug\org\dhis2\commons\dialogs\calendarpicker\CalendarPicker_MembersInjector.java:7: error: cannot find symbol
@Generated(
 ^
  symbol: class Generated

@vgarciabnz I don’t know if you can help me solve this.

Thanks in advance

Hello @Gassim, please do you know who could help on this?

1 Like

Hi @Mamadou_Tafsir_Diall,

the error seems to come from a dagger generated class, maybe there were some inconsistencies coming from previous builds. Could you try cleaning the project and building again? ./gradlew clean.

And which branch of the app are you using? Maybe @Pablo can help us on this.

Hi @diallotafsir52,
This may be caused by the jdk android studio uses. Please check that you are using a java 8 jdk.

2 Likes

:android:@diallotafsir52 great! :grin::+1: You’ve got @dhis2-android team here. :arrow_up:

Hello @Pablo and @vgarciabnz thanks for your feedback.

I checked and changed the jdk version to jdk 8 and I’m using 2.4.3 release branch.

Now it’s working