Prerequisites
Configure your project to work with AATKit
Set the project's Target Compatibility to 1.8
AATKit requires Java 1.8, to make the project compile properly you need to set your project's Target Compatibility to 1.8. See here for more instructions.
Enable core library desugaring
Due to Google Play Services ads library, your project may now need core library desugaring to be enabled to build. Please follow the linked documentation in case of issues.
Use AndroidX
AATKit requires AndroidX instead of old support libraries. Please visit the "Migrating to AndroidX" page for migration instructions.
Enable cleartext traffic
Some ad networks might not work correctly because of cleartext HTTP traffic being disabled by default. To make them work you need to enable cleartext traffic, for example by adding declaration in AndroidManifest.xml like:
<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
...
<application
...
android:usesCleartextTraffic="true"
...>
...
</application>
</manifest>
Define your application name in AndroidManifest.xml
It is advised to initialise AATKit and create the needed placements in your application's onCreate
method. To do so, first you must first define your application's main class name in AndroidManifest.
<application
android:name="MyApplication"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="MyActivity"
...
Last updated