Setup
Add gptdriver Android library to your dependencies. (Maven Central)
dependencies {
// ...
androidTestImplementation("io.mobileboost.gptdriver:gptdriver-compose:1.4.0")
// ...
}
Import the library in your testing code
import io.mobileboost.gptdriver_ktl.GptDriver;
If needed, add packaging exclude rules in the android section of the build.gradle.kts (:app) file
To resolve build failures caused by duplicate metadata files from dependencies, exclude them from the packaging process.
android {
// ...
packaging {
resources {
excludes.addAll(listOf("META-INF/INDEX.LIST", "META-INF/io.netty.versions.properties"))
}
}
// ...
}
If not already present, add internet permissions to the AndroidManifest.xml file
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- ... -->
<uses-permission android:name="android.permission.INTERNET" />
<application>
<!-- ... -->
</application>
<!-- ... -->
</manifest>
Last updated