Skip to main content

3. Import the Metric SDK using Gradle

Once you've added the Maven repository, you can import the Metric SDK into your Android project using Gradle.

In your app module's build.gradle file (usually located within the app/ directory):

dependencies {
implementation "com.metric:metric-sdk:0.2.1"
}

This step adds the Metric SDK to your project as a dependency, allowing you to use its functionality in your code.

Note: The 0.1.16 in the implementation line represents the version of the Metric Android SDK. You can replace it with the latest version number provided in the documentation.