FhirContext.forR4() fails on Android

19 views
Skip to first unread message

Alexandre Guimond

unread,
Jun 25, 2024, 9:50:48 AM (11 days ago) Jun 25
to HAPI FHIR
Hello,

I'm trying to build an android application that connects to a FHIR server. I'm new to Java and Android and starting from hapi-fhir-android-integration-test. Unfortunately FhirContext.forR4() fails (and I'm not able to catch an exception and provide more information). The code seems pretty simple. Am I missing a dependency or some initialisation code? 

Please see attached for code and buidl.gradle.

Thanks for any help.

ag
build.gradle
ListCitizensActivity.java

Jing Tang

unread,
Jun 27, 2024, 5:54:46 AM (9 days ago) Jun 27
to Alexandre Guimond, HAPI FHIR, Android FHIR SDK Eng
Hi Alexandre,

If you're trying to build an android application, I wonder if the build file of this demo app will help.

More info:

More specifically there's some stuff we had to do here to make the build work.

Regards
Jing

--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hapi-fhir/b22955fc-3cdc-4e1e-a3fc-f53bcc2502dbn%40googlegroups.com.

Alexandre Guimond

unread,
Jul 3, 2024, 3:50:33 PM (3 days ago) Jul 3
to HAPI FHIR
Thank you for the feedback. It took me a while to understand the build process for the demo app, and it turns out all i was missing was  (as is stated in the manual...)   
configurations.all {
exclude(group = "org.apache.httpcomponents")
}

as well as a bit more understanding about debugging android activities. But all good now. Thanks again for the help.
Reply all
Reply to author
Forward
0 new messages