안녕하세요 휴머스온입니다. Google의 플레이스토어 배포 정책이 변경되어 어플리케이션에 조치가 필요하게 되었습니다. 가이드에 맞게 조치를 하지 않을 경우 특정 조건에 따라 앱이 강제 종료 될 수 있기 때문에 되도록 가이드에 따라 반영하여 주시기 바랍니다.
Android 9.0
에서 Apache HTTP 클라이언트 지원이 중단되었습니다. 실제로 지원이 중단된 것은 Android 6.0
버전이나 Android 9.0
이상부터는 특정 예외 처리 없이 Apache HTTP 클라이언트를 사용할 경우 NoClassDefFoundError
예외가 발생합니다.
이미지가 포함된 푸시를 수신받았을때 앱이 강제 종료됩니다.
28
이상으로 설정된 어플리케이션Android 9.0
이상의 OS가 탑재된 디바이스어플리케이션 AndroidManifest.xml
에 다음 사항을 추가하여 주시기 바랍니다.
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
Android 9.0에서 TLS를 사용한 통신이 기본값으로 적용되었습니다. 그에따라 별도로 예외처리 하지 않고 TLS를 사용하지 않은 연결을 사용한다면 실패로 처리됩니다.
API 호출 시 실패 응답이 떨어집니다. 앱은 강제 종료되지 않습니다.
28
이상으로 설정된 어플리케이션Android 9.0
이상의 OS가 탑재된 디바이스해결 방법은 두가지 방법이 있으며 방법 중 한 가지 방법만 적용하여도 무방합니다.
어플리케이션에서 TLS를 사용하지 않도록 통신하도록 예외처리하기
src/main/res
에 xml 디렉토리를 추가하여 주시기 바랍니다.network_config
XML 파일을 생성하여 주시기 바랍니다.network_config
를 요구사항에 맞게 하나를 선택하여 작성합니다.
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">api.pushpia.com</domain>
</domain-config>
</network-security-config>
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>
AndroidManifest의 application에 작성한 network_config
를 적용합니다.
<application
...
android:networkSecurityConfig="@xml/network_config">
</application>
Android X 전환이란 Android에서 제공하는 Support Library를 Android X 라이브러리로 일대일 전환하는 것을 의미하며, 최신 버전의 AndroidStudio에서 강제적으로 Android X로의 전환을 강제적으로 요구하는 경우가 확인되었습니다. 이 경우 어플리케이션에서만 Android X 전환 대응을 한다면 ClassNotFoundException
이 발생하므로 SDK도 Android X 대응 전용을 사용해야 합니다.
구글 플레이는 대상 SDK 버전 28
만을 요구하고 있기 때문에 Android X 전환은 필수 사항이 아니므로 전환 대응을 할지 말지 선택이 필요합니다.
28
이상으로 설정된 어플리케이션3.4.2
이상인 프로젝트Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:18:5-100:19 to override.
Android X 전환 대응을 하지 않도록 설정할 경우
build.gradle
에서 Support Library를 28.0.0
으로 설정implementation 'com.android.support:appcompat-v7:28.0.0'
...
build.gradle
에서 FirebaseCloudMessaging Library를 다음과 같이 설정implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
...
build.gradle
에서 의존성을 다음과 같이 설정dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
...
}
gradle.properties
를 다음과 같이 설정distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
File/Invalidate Cashes / Restart...
를 클릭하여 재시작Android X 전환 대응을 할 경우
Android X 대응 전용 SDK는 cs_pms@humuson.com로 요청하여 주시기 바랍니다.