본문 바로가기
[android] NoClassDefFoundError for SafeBrowsingResponse [android] NoClassDefFoundError for SafeBrowsingResponse -아래와 같은 로그를 보았다. (@ 26(8.0 OOS) device, targetSDK 23(6.0 MOS) )그래서 research 를 해보았다.I/zygote64: Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/webkit/SafeBrowsingResponse; at void com.android.webview.chromium.WebViewChromium.init(java.util.Map, boolean) (PG:53) at .. 2018. 11. 30.
[android] Cookie 는 android 단말에서 world wide 한가? [android] Cookie 는 android 단말에서 world wide 한가? -Cookie 자체가 우선 webview 가 아닌 CookieManager 라는 녀석을 통해 앱 기준 world-wide 하게 작동하기 때문에..혹시 이 녀석이 Device 기준 world-wide 하게 작동하지는 않을 하는 궁금증이 생겨났다. -테스트 환경은 Samsung Galaxy J5 NOS (Nougat) -CookieManager 의 doc 을 보면 아래와 같이 써있다. literally 각 application 으로 보이지만, 약간의 해석의 여지가 있어보여 테스트를 했다."Manages the cookies used by an application's WebView instances.” -A 앱에서 cooki.. 2018. 11. 29.
[android] JobIntentService 소개 (tutorial) [android] JobIntentService 소개 (tutorial) https://medium.com/til-kotlin/jobintentservice-for-background-processing-on-android-o-39535460e060https://developer.android.com/reference/android/support/v4/app/JobIntentService -JobIntentService 는 SupportLib 에 들어있다. -JobIntentService 는 Android O 부터는 JobScheduler 를 사용하고, Android O 이전 단말에서는 background service 를 사용한다. -Android O 이전 단말에서는 background 서비스가 즉각적.. 2018. 11. 28.
[android] AAC 로 app 의 background, foreground 상태 알기 https://medium.com/@arturogdg/background-and-foreground-events-with-android-architecture-components-233fdd9fa855https://developer.android.com/reference/android/arch/lifecycle/Lifecycle -build.gradle 에 아래것을 추가한다.kapt "android.arch.lifecycle:compiler:1.1.1"implementation "android.arch.lifecycle:extensions:1.1.1” -background, foreground state detection 을 위해 아래 클래스를 생성한다.class ApplicationObserver : .. 2018. 11. 24.
[android] code 와 resource shrink 하자! -android 에서는 ProGuard 를 통해서 사용하지 않는 class, field, method 를 제거할 수 있다.또한 bytecode 를 optimize 하고, 사용하지 않는 code instruction 도 제거하고, 남아있는 코드들에 대해 short name 으로 난독화를 수행한다. Shrink your code -ProGuard 로 code shrinking 을 하려면 gradle 에서 minifyEnable 을 true 를 설정해주면 된다.code shrinking 은 build 시간을 늘리기 때문에 debug 에서는 사용하지 않는 것이 좋고, final apk 에 적용한 후에는 충분한 테스트도 거쳐야 한다. proguard 설정에 따라 에러가 날 수 있다.android { buildTy.. 2018. 11. 23.
[android] D8 이 뭐야? -D8 이 이제 기본 dex compiler 이다. (기존에는 DX 라는 녀석이 기본 dex compiler 였다.)D8 은 더 빠르게 더 작은 .dex 파일을 만들어낸다.D8 이 만든 dex 는 runtime performance 가 기존의 DX 가 만들어낸 것과 같거나 이상이다. -D8 은 Android Studio 3.1 부터 기본 compiler 가 되었다. Android Studio 3.0 에서부터 이용할 수 있지만 당시는 optional 이었다.( Android Studio 3.0 에서는 gradle.properties 에 android.enablerD8=true 를 넣어줘야 한다.) -Android Studio 3.1 이상을 사용하면서 만약 컴파일 이슈가 있다면, gradle.properti.. 2018. 11. 22.
[android] APK Signature Scheme v2 -APK Signature Scheme v2 는 verification speed 를 향상시키고, APK 의 일부가 변경되었는지 detecting 하는 것이 강화되어 보안에도 더 안전하다. APK Signature Scheme v2 는 APK Signing Block 을 Zipping 하기 전에 APK 에 넣는다. -Jar signing(v1 scheme) 은 ZIP metadata 등의 일부 영역을 보호하지 못했다.그리고 verify 를 위해서 모든 entry 를 압축해제해야 했으며, 이는 많은 시간과 메모리를 소모했다.이 때문에 Android 7.0(NOS) 에서 APK signature scheme v2 가 나왔다. v2 scheme 은 APK file 을 blob 으로 여기고 전체 file 에 대.. 2018. 11. 21.
[android] Staged Rollout? [android] Staged Rollout? https://medium.com/bleeding-edge/the-art-of-staging-a-rollout-8e203b337b75 -Staged Rollout 은 Google Play Store 를 통해 업데이트 앱을 배포할 때 전체를 대상으로 하는 것이 아니라일정 퍼센트만큼 점진적으로 업데이트를 진행하는 것을 이야기한다. -Staged Rollout 이 도입된 이유는 배포된 앱에 문제가 있을 때 이를 겪는 유저의 수를 줄이기 위해서이다.일부 퍼센트의 유저에게만 배포한 후 모니터링하여 문제가 발생하면 배포를 중단하고 이슈를 수정한다.수정된 앱을 재배포하게 되면 동일한 문제를 다른 유저들은 겪지 않는 것이다. -Staged Rollout 대상은 random.. 2018. 10. 12.
[Android] ART vs. Dalvik [Android] ART vs. Dalvik https://source.android.com/devices/tech/dalvik/ Ahead-of-time ( AOT ) compilation -ART 는 AOT compile 을 제공한다. 이는 install-time 은 더 오래 걸리지만, app 자체의 performance 는 더 향상된다.Install time 에 ART 는 app 을 on-device dex2oat tool 을 이용해 compile 한다.이 dex2oat 는 DEX 파일을 input 으로 받아서 target device 에 맞는 compiled app executable 을 생성해낸다.( ART 이전에 개발된 앱들은 문제가 생길 수 있다. https://developer.androi.. 2018. 10. 11.
반응형