Preparing Your Android Project
The first step towards integration is to prepare your Android Studio and its dependencies.
Android Studio projects contain two levels of build.gradle
files: Project level build.gradle file and Module level build.gradle file. We need to make appropriate additions to dependencies at both levels as described below.
Making changes to Project Level build.gradle
build.gradle
Please update the following entry to your repositories under allProjects
in Project Level build.gradle
file.
buildscript{
.
.
repositories {
jcenter()
}
.
.
dependencies {
.
.
classpath 'com.google.gms:google-services:4.3.15'
.
.
}
.
.
}
allprojects {
.
.
repositories {
jcenter()
maven {
url "http://android-lib.kruzr.co:8081/repository/kruzr-android-assistant/"
allowInsecureProtocol true
}
}
.
.
}
Making Changes to Module Level build.gradle
build.gradle
Please add the following dependency to your Module Level build.gradle
file as shown below
dependencies {
implementation 'co.kruzr.assistant:kruzrmodule:3.0.0.beta.2'
}
Adding lintOptions
and CompileOptions
to avoid unexpected issues
lintOptions
and CompileOptions
to avoid unexpected issuesSpecify lintOptions
to prevent extraneous lint errors, specify packagingOptions
to prevent unnecessary files from being included in your app (which may otherwise cause problems) and specify compileOptions to use Java 8 to allow your app to be installed on pre-Nougat devices.
android {
lintOptions {
disable 'InvalidPackage'
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
Make Changes to Android Manifest
Android Manifest
Please make sure that you make the following additions to your Android Manifest
<uses-permission android:name="android.permission.INTERNET" />
/**
* usesCleartextTraffic is meant for Development environments only.
* In production environments and before uploading to PlayStore, please remove this tag
*/
<application
android:usesCleartextTraffic="true"
...
>
Once you have made changes to these dependencies and set-up the above options, you are ready to set-up Initializations of Kruzr SDK within your app. Please continue to the next section!
Last updated
Was this helpful?