Implementing AndroidX

This guide provides information required to implement AndroidX necessary for using BuzzScreen 3 and BuzzAd Benefit 2.

 

Requirements


AndroidX

  • Migrate the existing project to AndroiX with Google’s Migration Guide.

  • Requires Gradle 3.2.1 or higher (wrapper 4.6+)

  • Add the below code in AndroidManifest.xml if minSdkVersion is 15 or lower.

<uses-sdk tools:overrideLibrary="com.google.android.exoplayer2.core, com.google.android.exoplayer2.ext.ima, com.google.android.exoplayer2.source.hls, com.google.android.exoplayer2.ui" /> <application> ... </application>

 

  • Set compileOptions of build.gradle as below.

android { ... compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } }

 

  • The following resource is applied with a new package in Android X.

    • In addition to the items below, there may be more resources with package change. In such case, an error may occurs during build, additional treatment is necessary.

androidx.appcompat.appcompat.R → androidx.appcompat.R android.support.design.R → com.google.android.material.R

 

Troubleshooting


WorkManager

  • In above case, set resolutionStrategy of bulid.gradle as below.