/
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
BuzzAd-Benefit Android SDK 연동 가이드
BuzzAd-Benefit Android SDK 연동 가이드
Read with this
(ver 2.23.x) 10.2. AndroidX 사용하기
(ver 2.23.x) 10.2. AndroidX 사용하기
More like this
매체사 포인트 적립 포스트백 API 연동
매체사 포인트 적립 포스트백 API 연동
Read with this
(ver 2.31.x) 10.2. AndroidX 사용하기
(ver 2.31.x) 10.2. AndroidX 사용하기
More like this
BuzzAd Ext.point
BuzzAd Ext.point
Read with this
(ver 1.6.x) BuzzScreen Extension SDK 연동
(ver 1.6.x) BuzzScreen Extension SDK 연동
More like this