Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

본 가이드는 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'
  }
}

  • No labels