Migrating from Android v5

This guide outlines the necessary steps to upgrade your project from the 5.x versions of the Android SDK to the latest 6.0 version. The upgrade process involves removing certain files and dependencies, adding or updating others, and ensuring the correct Gradle version. Follow the steps below to complete the migration successfully.

Step 1: Remove File from the libs Folder

  1. Navigate to your project's libs folder.
  2. Delete the following file:
    • scanforensics.aar

Step 2: Update build.gradle (app)

  1. Add buildFeatures Configuration:

    buildFeatures {
        dataBinding true
        viewBinding true
        buildConfig true
        compose true
    }
    
  2. Add compileOptions and kotlinOptions:

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
    
  3. Add composeOptions:

    composeOptions {
        kotlinCompilerExtensionVersion '1.3.2'
    }
    
  4. Remove the Following Implementations:

    implementation 'com.acuant:acuantcommon:11.5.4'
    implementation 'com.acuant:acuantcamera:11.5.4'
    implementation 'com.acuant:acuantimagepreparation:11.5.4'
    implementation 'com.acuant:acuantfacecapture:11.5.4'
    implementation 'com.acuant:acuantpassiveliveness:11.5.4'
    implementation 'com.github.smart-fun:XmlToJson:1.5.1'
    
  5. Add/Update the Following Dependencies:

    // Core
    implementation "androidx.core:core-ktx:1.10.0"
    
    // UI
    implementation "androidx.appcompat:appcompat:1.6.1"
    implementation "com.google.android.material:material:1.9.0"
    
    // Navigation
    implementation "androidx.navigation:navigation-fragment-ktx:2.6.0"
    implementation "androidx.navigation:navigation-ui-ktx:2.6.0"
    implementation "androidx.navigation:navigation-compose:2.6.0"
    
    // Compose
    implementation platform("androidx.compose:compose-bom:2023.06.01")
    implementation "androidx.compose.compiler:compiler:1.3.2"
    implementation "androidx.compose.runtime:runtime:1.3.2"
    implementation "androidx.compose.material:material:1.3.2"
    implementation "androidx.compose.ui:ui-tooling"
    implementation "androidx.compose.ui:ui-tooling-preview"
    implementation "androidx.lifecycle:lifecycle-runtime-compose:2.6.0"
    
    implementation 'com.github.DImuthuUpe:AndroidPdfViewer:3.1.0-beta.1'
    
    // Kotlin
    implementation platform("org.jetbrains.kotlin:kotlin-bom:1.8.22")
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android"
    
    // OkHttp
    implementation "com.squareup.okhttp3:okhttp:4.11.0"
    implementation "com.squareup.okhttp3:logging-interceptor:4.11.0"
    
    // Profiler
    implementation "com.localebro:okhttpprofiler:1.0.8"
    
    // Retrofit
    implementation "com.squareup.retrofit2:retrofit:2.9.0"
    implementation "com.squareup.retrofit2:converter-gson:2.9.0"
    implementation "com.squareup.retrofit2:converter-moshi:2.9.0"
    
    // Moshi
    implementation "com.squareup.moshi:moshi:1.14.0"
    implementation "com.squareup.moshi:moshi-adapters:1.14.0"
    kapt "com.squareup.moshi:moshi-kotlin-codegen:1.14.0"
    
    // Dagger
    implementation "com.google.dagger:dagger:2.50"
    implementation "com.google.dagger:dagger-android:2.50"
    implementation "com.google.dagger:dagger-android-support:2.50"
    kapt "com.google.dagger:dagger-compiler:2.50"
    kapt "com.google.dagger:dagger-android-processor:2.50"
    
    // Mixpanel
    implementation "com.mixpanel.android:mixpanel-android:7.4.1"
    
    // Launch Darkly
    implementation "com.launchdarkly:launchdarkly-android-client-sdk:5.0.0"
    

Step 3: Update build.gradle (project)

  1. Update Kotlin Gradle Plugin Version:

    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
    
  2. Remove the Following Repositories from allprojects:

    maven { url 'https://raw.githubusercontent.com/Acuant/AndroidSdkMaven/main/maven/' }
    maven { url 'https://raw.githubusercontent.com/iProov/android/master/maven/' }
    

Step 4: Ensure Correct Gradle Version in gradle-wrapper.properties

  1. Open gradle-wrapper.properties:

    • Navigate to your project's gradle/wrapper/gradle-wrapper.properties file.
  2. Update the Gradle Distribution URL:

    • Ensure the Gradle version is at least 7.5. If it is not, update the distributionUrl to:
      distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
      

By following these steps, you can successfully migrate your project from version 5.x to version 6.0 of the Android SDK. For further details and additional resources, please refer to the ReadyRemit developer portal: ReadyRemit Developer Portal.
Collapse