Android
-
Android KeyStore 정보를 환경 변수로 저장/사용 (for.Mac)Android 2020. 1. 23. 23:43
Android KeyStore의 Password 나 Alias 정보를 git에 그대로 올려버릴경우 보안상 문제가 발생할수도 있읍니다. 이럴경우 환경변수에 정보를 저장하여 소스상에서 노출하지 않고 필요한 정보를 입력 할 수 있습니다. 1. mac 터미널을 열어서 아래의 명령어를 입력 (파일이 없다면 생성하시면 됩니다.) vim .bash_profile 2. vi 에서 아래의 내용을 작성하시고 :wq 입력하여 저장 PATH=$PATH:/Users/(자신의 맥이름)/Library/Android/sdk/platform-tools/ export KEYSTORE_PASSWORD=xxxxx export KEY_ALIAS=xxxxx export KEY_PASSWORD=xxxxx 3. 아래 명령어를 입력하여 적용 sou..
-
Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6Android/Error 2020. 1. 9. 00:05
Cannot inline bytecode built with JVM target 1.8 into bytecode that is being built with JVM target 1.6 위와 같은 에러가 발생시 App build.gradle 에 아래의 부분을 추가합니다. android { ... compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = JavaVersion.VERSION_1_8.toString() } } 또는 preferences... -> kotlin Compier -> Kotlin to JVM -> Tar..
-
Android Learning Links (안드로이드 학습 링크)Android 2020. 1. 7. 14:13
안드로이드를 공부하기 위한 유용한 사이트 링크 [안드로이드 개발자 공식사이트] https://developer.android.com/ Android Developers The official site for Android app developers. Provides the Android SDK tools and API documentation. developer.android.com [안드로이드 개발자 학습 코스] https://developer.android.com/courses Training Courses | Android Developers Find the training option that's right for you. developer.android.com [구글 코드 랩스] https://..
-
java.lang.RuntimeException: Method myLooper in android.os.Looper not mocked.Android/Error 2020. 1. 7. 09:52
테스트 코드 실행시 아래와 같은 에러가 발생시 조치 방법 java.lang.RuntimeException: Method myLooper in android.os.Looper not mocked. build.gradle 에 아래와 같이 추가 android { // ... testOptions { unitTests.returnDefaultValues = true } } [참고링크] http://tools.android.com/tech-docs/unit-testing-support#TOC-Method-...-not-mocked.- Unit testing support - Android Studio Project Site Android tools project information site tools.andro..
-
Android 고유식별자 (unique identifiers)Android 2020. 1. 2. 23:19
안드로이드에서 하드웨어의 고유한 구분값이 필요한 경우가 있습니다. 하지만 무분별하게 고유값을 가져올경우 개인의 위치 식별이나 해킹 개인정보등에 노출이 있을수 있기 때문에 한정된 방법으로 고유식별자를 가져오도록 권장하고 있습니다. https://developer.android.com/training/articles/user-data-ids 고유 식별자 권장사항 | Android 개발자 | Android Developers이 문서에서는 사용 사례에 따라 앱에 적합한 식별자를 선택하는 방법을 설명합니다. Android 권한과 관련된 일반적인 내용은 권한 개요를 참조하세요. Android 권한을 사용하기 위한 구체적인 권장사항은 앱 권한 권장사항을 참조하세요. Android 식별자 사용 권장사항 Android ..
-
No tests were found (Test code running failed)Android/Error 2019. 12. 26. 17:52
안드로이드에서 Test코드가 실행이안되며 No test were found 라고 에어를 출력한다면 gradle 에서 testInstrumentationRunner 가 예전 android.support로 되어 있을 수 있습니다. testInstrumentationRunner = 'android.support.test.runner.AndroidJUnitRunner' androidX 로 변경해줍니다. testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner'
-
Android Studio Editor 폰트(글꼴) 변경Android 2019. 12. 17. 18:02
Mac 기준으로 설명입니다. Android studio -> Prefernces 로 이동 Editor -> Font 로이동 Font 항목에서 원하는 폰트를 선택후 OK 버튼 클릭 [사용 글꼴] https://dnight.tistory.com/entry/%EB%84%A4%EC%9D%B4%EB%B2%84-%EB%82%98%EB%88%94%EA%B3%A0%EB%94%95-%EC%BD%94%EB%94%A9%EA%B8%80%EA%BC%B4 네이버 나눔고딕 코딩글꼴 https://github.com/naver/nanumfont naver/nanumfont Contribute to naver/nanumfont development by creating an account on GitHub. github.com 네이버..
-
Storage Access Framwork 다루기 (Android ScopedStorage)Android 2019. 12. 13. 11:25
https://github.com/DNights/AndroidScopedStorageSample DNights/AndroidScopedStorageSample Android scoped storage sample project. Contribute to DNights/AndroidScopedStorageSample development by creating an account on GitHub. github.com Storerage Accesss Framwork(SAF) 를 이용하여 파일을 다루는 방법에 대한 내용입니다. SAF의 파일 구조는 Root 를 지정하여 그 하위의 Document들을 트리형태로 가진 구조를 입습니다. 제어 방식은 Intent를 통해서 Open Document, Create Do..
-
MediaStore File 다루기 (Android ScopedStorage)Android 2019. 12. 11. 12:33
https://github.com/DNights/AndroidScopedStorageSample DNights/AndroidScopedStorageSample Android scoped storage sample project. Contribute to DNights/AndroidScopedStorageSample development by creating an account on GitHub. github.com SDK 29(Android Q/Android 10) 부터 ScopedStorage가 적용되어 외부 저장소에 접근이 제한되었습니다. 앱별 디렉터리의 경우 앱 제거시 저장된 파일 들이 같이 삭제가 됩니다. 미디어 컬랙션의 경우 지정된 위치의 폴더(DCIM, Pictures ...)에만 접근이 가능..
-
Android R8 CompilerAndroid 2019. 12. 5. 11:43
https://github.com/DNights/AndroidR8Sample DNights/AndroidR8Sample Contribute to DNights/AndroidR8Sample development by creating an account on GitHub. github.com Android 의 기존의 Proguard 에서 R8으로 코드 최적화및 난독화 툴이 새롭게 업데이트 되었다. gradle plugin 3.3 에서 사용할 수 있으며 3.4부터 기본 탑제 되었습니다. R8은 디슈가링, 축소, 난독화, 최적화, 덱싱 등을 모두 한 단계로 통합된 형태로 아래 그림처럼 ProGuard와 달리 컴파일과 최적화를 통합하여 수행한다. R8 세팅 방법은 Github 페이지에 작성 하였습니다. 참고 바랍..