Android Setup
This SDK is deprecated and will receive limited support. Please adopt the v10 SDK: Flutter v10
Supported Versions
Minimum supported version is android 4.04 api 15
Maximum supported version is android 13 api 33
[Video] How to integrate Smile ID Flutter v7 SDK for Android
Gradle Integration
This is best done in Android Studio but if not installed can be done by looking at the android folder of your flutter native project
1. In your root-level (project-level) Gradle file (build.gradle
), add rules to include the Maven Central repository.
2. Declare the Smile ID android SDK in your root level Gradle file (usually build.gradle
).
3. In your module (app-level) Gradle file (usually app/build.gradle
), apply the Smile ID android plugin:
4. In your module (app-level) Gradle file (usually app/build.gradle
), add the Smile ID UI and SDK dependancies
The latest version for smile id sdks can be found here
NB: If you have already integrated with the Android SDK only Remove the reference to the Smile ID dependency as the Smile UI will automatically pull the correct version in. and also remember to check the latest version here
Android Manifest
Permissions
Add the following permissions if they do not exist already
Activities
Add the following activities under the application tag
Proguard Rules
If using Proguard, then please add the following proguard rule to your rules file (usually called proguard-rules.pro
)
Smile Config
Place the file you downloaded from the portal as specified here in the android/app folder
That's it android is ready!
Troubleshooting
There are issues that could come up during setup , you can follow the recommended solutions for work arounds\
Execution failed for task ':app:mergeDebugJavaResource'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade More than one file was found with OS independent path 'META-INF/DEPENDENCIES'.
Solution: add this to your module level build.gradle\
Manifest merger failed : Attribute application@label value=xxx
Solution: add the snippet below to your AndroidManifest.xml\
D8: Cannot fit requested classes in a single dex file
Solution: enable android dex as documented here by doing the below
Last updated