Appearance
Installation
Dependencies
The emrtd-<version>.aar and jp2-android.aar need to be included in your app. You can find these in the app/libs folder of the example project.
Configure your app-level build file to include libraries from the app/libs folder and the following external dependencies:
kotlin
// app/build.gradle.kts
dependencies {
implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*"))))
implementation("org.jmrtd:jmrtd:0.8.3")
implementation("org.bouncycastle:bcprov-jdk18on:1.83")
implementation("org.bouncycastle:bcpkix-jdk18on:1.83")
}groovy
// app/build.gradle
dependencies {
implementation fileTree(dir: 'libs', include: '*')
implementation 'org.jmrtd:jmrtd:0.8.3'
implementation 'org.bouncycastle:bcprov-jdk18on:1.83'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.83'
}Jetifier Configuration
Add BouncyCastle to Jetifier's ignore list in your gradle.properties:
properties
android.jetifier.ignorelist = bcprov-jdk18on-1.83.jarPackaging Options
Resolve file-duplication conflicts in dependencies:
kotlin
// app/build.gradle.kts
android {
packagingOptions.resources.excludes += "META-INF/versions/9/OSGI-INF/MANIFEST.MF"
}groovy
// app/build.gradle
android {
packagingOptions {
resources {
excludes += 'META-INF/versions/9/OSGI-INF/MANIFEST.MF'
}
}
}