Android
-
[Android] 갤러리에서 이미지 선택 후 이미지뷰에서 보여주기Android 2020. 6. 23. 16:03
버튼 onClick 이벤트에 아래처럼 구현 Java Intent intent = new Intent(Intent.ACTION_PICK); intent. setDataAndType(android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*"); startActivityForResult(intent, REQUEST_CODE); Kotlin val intent = Intent(Intent.ACTION_PICK) intent.setDataAndType( MediaStore.Images.Media.EXTERNAL_CONTENT_URI, "image/*" ) startActivityForResult(intent, REQUEST_CODE) onAc..
-
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListenerAndroid 2020. 6. 20. 16:45
Error message Rejecting re-init on previously-failed class java.lang.Class: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; Only implementaion in gradle file implementation 'androidx.core:core-ktx:1.3.0' Change in gradle file like below implementation 'androidx.core:core:1.3.0' implementation 'androidx.core:core-ktx:1.3.0'
-
Android Library(Android Archive) aar의 리소스 변경하기Android 2020. 6. 18. 13:57
Modifying contents of Android .aar file / Converting to and from .zip format 안드로이드 라이브러리 파일의 리소스를 내가 원하는 것으로 변경하고 싶을 때 리눅스 환경에서 unzip으로 압축을 풀고 tempFolder로 들어가서 변경할 resource를 수정한다. unzip library.aar -d tempFolder 다시 패키징하기 위해 압축을 풀었던 디렉토리로 이동한다. cd tempFolder 상위 디렉토리에 NewLibrary.aar이란 이름으로 zip 압축을 다시 한다. zip -r ../NewLibrary.aar * 다시 import 후 사용한다.