FHIR Chat · Android Gradle Dependencies · implementers

Stream: implementers

Topic: Android Gradle Dependencies


view this post on Zulip Matt Cook (Dec 02 2021 at 06:15):

I'm trying to get started with FHIR for an Android app in Android Studio but I'm having trouble including the dependencies to use the libraries. Everything I try causes the project to no longer build successfully. I have a different project that runs on my PC in a different IDE where everything was set up for me and that works. I've tried copying the dependencies, converting it from maven format to gradle (ca.uhn.hapi.fhir:hapi-fhir-structures-r4:5.1.0). That didn't work. In the HAPI FHIR Client page, Chapter 13 is on the android client. It says to add these lines to the dependencies:

compile "ca.uhn.hapi.fhir:hapi-fhir-android:3.1.0-SNAPSHOT"
compile "ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2:3.1.0-SNAPSHOT"
(I know the versions here are a bit outdated, that's just what's in the documentation, I'm trying the most recent version)

Apparently 'compile' has been deprecated and Android Studio recommends I use 'implementation' instead. That doesn't work either though.
There are a couple sample android projects linked in the documentation too. I've tried downloading and referencing both, and neither builds properly to begin with

How can I get this to work?

view this post on Zulip Lloyd McKenzie (Dec 02 2021 at 17:26):

You might ask on #hapi


Last updated: Apr 12 2022 at 19:14 UTC