google / android-fhir

The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first healthcare applications using the HL7® FHIR® standard on Android.
https://google.github.io/android-fhir/
Apache License 2.0
497 stars 296 forks source link

Unable to find UnitConverter and Converter Exception #1476

Closed anshul90 closed 2 years ago

anshul90 commented 2 years ago

Describe the bug I'm adding FIHR Engine as the module in my project but unable to find UnitConverter and Converter Exception. I'm creating a new build.gradle as my project supports Groovy files only. Mentioned my gradle.file below . I'm getting only two errors:

  1. Unable to UnitConverter and Converter Exception
  2. Cannot access of FilterCriteria file.
plugins {
    id 'com.android.library'
    id 'kotlin-android'
}

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.2"

    defaultConfig {
        minSdkVersion 28
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        consumerProguardFiles "consumer-rules.pro"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {
    def work_version = "2.7.1"
    def roomVersion = "2.3.0"

    //Room Library
    implementation "androidx.room:room-runtime:$roomVersion"
    annotationProcessor("androidx.room:room-compiler:$roomVersion")
    //Kotlin Extensions and Coroutines support for Room
    implementation("androidx.room:room-ktx:$roomVersion")

    implementation "androidx.appcompat:appcompat:$app_compat"
    implementation "com.google.android.material:material:$mat_ver"

    //kotlin coroutine
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation "androidx.core:core-ktx:$ktx_extension"
    implementation "androidx.work:work-runtime-ktx:$work_version"

    //network
    implementation "com.squareup.retrofit2:retrofit:$retrofit"
    implementation "com.squareup.retrofit2:converter-gson:$retrofit"
    implementation "com.google.code.gson:gson:$gson"
    implementation "com.squareup.okhttp3:okhttp:$okhttp"
    implementation "com.squareup.okhttp3:logging-interceptor:$okhttp"

    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

    //Data Store
    implementation "androidx.datastore:datastore-preferences:1.0.0"

    //Fhir Hapi libraries
    implementation 'ca.uhn.hapi.fhir:hapi-fhir-android:6.0.1'
    //implementation 'ca.uhn.hapi.fhir:hapi-fhir-client:5.7.2'
    //implementation 'ca.uhn.hapi.fhir:hapi-fhir-base:6.0.1'
    implementation 'ca.uhn.hapi.fhir:hapi-fhir-structures-r4:6.0.1'

    //Log Timber
    implementation "com.jakewharton.timber:timber:5.0.1"

    //android ktx
    implementation "androidx.core:core-ktx:$ktx_extension"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lfcycle"
    implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lfcycle"

    //Sqlite
    implementation 'net.zetetic:android-database-sqlcipher:4.5.1@aar'
    implementation 'androidx.sqlite:sqlite:2.0.1'

    //JSON Patch
    implementation("com.github.fge:json-patch:1.7")
}

Added the screenshots of both the errors below.

Screenshot 2022-06-24 at 5 03 39 PM Screenshot 2022-06-24 at 5 04 44 PM
aditya-07 commented 2 years ago

The engine module depends on the common module. Adding it in the dependencies should resolve the issues.

anshul90 commented 2 years ago

Nobody responded so I removed this library from my project.

On Wed, Sep 21, 2022 at 4:47 PM aditya-07 @.***> wrote:

@anshul90 https://github.com/anshul90 Are you still facing the issue?

— Reply to this email directly, view it on GitHub https://github.com/google/android-fhir/issues/1476#issuecomment-1253558972, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCEXWVP6TBKDFFWTA6OJ4DV7LVEXANCNFSM5ZXSLFXA . You are receiving this because you were mentioned.Message ID: @.***>

-- Regards,

Anshul Tyagi, email: @.*** cell: +91 9654361294

jingtang10 commented 2 years ago

for others: please see https://github.com/google/android-fhir/wiki/FHIR-Engine-Library#getting-started to get started. it's not clear how fhir engine is used here. seems to me the source code is being copied because the gradle dependency doesn't include fhir engine at al.

closing. anshul - please feel free to reopen if you need this in the future.