/
AndroidX 사용하기
AndroidX 사용하기
본 가이드는 BuzzScreen 3.x.x 및 BuzzAd Benefit 2.x.x 버전을 사용하기 위해 필요한 AndroidX 관련 내용을 담고 있습니다.
Requirement
AndroidX
구글의 Migration Guide를 참조해 프로젝트를 AndroidX로 Migration해야 합니다.
gradle 3.2.1 이상 필요. (wrapper 4.6+)
minSdkVersion이 15 이하일 경우, AndroidManifest.xml 에 아래 라인을 추가해야 합니다.
<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>
build.gradle
파일의compileOptions
항목을 아래와 같이 설정합니다.
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
다음의 리소스는 Android X에서 패키지가 변경되었기 때문에, 새로운 패키지로 적용합니다.
아래의 항목 외에, 앱내에서 패키지가 변경된 리소스가 더 존재할 수 있습니다. 이 경우, 빌드시 에러가 발생하므로 추가적인 적용이 필요합니다.
androidx.appcompat.appcompat.R → androidx.appcompat.R
android.support.design.R → com.google.android.material.R
Troubleshooting
WorkManager
java.lang.RuntimeException: Duplicate class androidx.work.ArrayCreatingInputMerger found in modules classes.jar (android.arch.work:work-runtime:1.0.0) and classes.jar
이 경우,
bulid.gradle
파일의resolutionStrategy
를 아래와 같이 설정합니다.
configurations.all {
resolutionStrategy {
exclude group :'android.arch.work', module: 'work-runtime'
}
}
, multiple selections available,
Related content
(ver 2.7.x) BuzzRoulette Android 연동 가이드
(ver 2.7.x) BuzzRoulette Android 연동 가이드
Read with this
(ver 4.45.x)(ver 5.3.x) BuzzScreen Android 연동 가이드
(ver 4.45.x)(ver 5.3.x) BuzzScreen Android 연동 가이드
More like this
BuzzAd-Benefit Android SDK 연동 가이드
BuzzAd-Benefit Android SDK 연동 가이드
Read with this
Native Ads 타입
Native Ads 타입
Read with this
BuzzScreen SDK Android 14 대응
BuzzScreen SDK Android 14 대응
More like this
BuzzScreen SDK 연동 시작하기
BuzzScreen SDK 연동 시작하기
More like this