Android
-
java.lang.NoSuchMethodException: ...<init>(...)Android/Error 2021. 3. 18. 16:13
java.lang.NoSuchMethodException: dev.dnights.baseViewHolder. (android.view.View) java 또는 kotlin 에서 getDeclaredConstructor() 를 이용해서 class를 생성할때 위와 같은 에러가 발생할경우 해당 생성자가 있는지 확인하고 proguard 나 dexguard 를 사용하고 있다면 아래의 예제처럼 예외처리를 하고 있는지 확인하여야 한다. -keepclassmembers class * extends dev.dnights.BaseViewHolder { (android.view.View); } [참고링크] emflant.tistory.com/52 Constructor 클래스의 getConstructor 와 getDeclar..
-
Android Notifications(알림) 표시Android 2021. 3. 14. 15:28
github.com/DNights/AndroidNotificationsSample DNights/AndroidNotificationsSample Contribute to DNights/AndroidNotificationsSample development by creating an account on GitHub. github.com 안드로이드 알림 표시 관련 샘플 코드 입니다. [참고 링크] developer.android.com/training/notify-user/channels 알림 채널 만들기 및 관리 | Android 개발자 | Android Developers Android 8.0(API 수준 26)부터는 모든 알림을 채널에 할당해야 합니다. 채널마다 채널의 모든 알림에 적용되는 시각적/음향적..
-
[안드로이드] Intent로 이미지 가져오기Android 2021. 3. 6. 13:20
github.com/DNights/AndroidGetImagesSample DNights/AndroidGetImagesSample Contribute to DNights/AndroidGetImagesSample development by creating an account on GitHub. github.com Android 에서 Intent로 ACTION_IMAGE_CAPTURE, ACTION_PICK 을 사용해서 이미지를 가져오는 샘플 코드입니다. 만드는 과정에서 발생한 이슈들 정리합니다. Issue 1. Android 5.0 대에서 ACTION_IMAGE_CAPTURE 로 이미지를 가지고 올 경우 class 변수의 imageCaptureUri 가 null 인 문제 이 경우는 사실 Android 5...
-
Execution failed for task ':app:compileProductionReleaseJavaWithJavac'.> javax/xml/bind/JAXBExceptionAndroid/Error 2021. 2. 9. 15:40
> Task :app:compileProductionReleaseJavaWithJavac FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileProductionReleaseJavaWithJavac'. > javax/xml/bind/JAXBException Execution failed for task ':app:compileProductionReleaseJavaWithJavac'. > javax/xml/bind/JAXBException 터미널에서 빌드중 위와 같은 에러가 발생하는 경우가 있다. 이경우는 JAXBException 이 java8에서 지원하는데 사용하는 PC..
-
Could not determine the dependencies of task ':app:uploadCrashlyticsMappingFileRelease'.Android/Error 2021. 1. 27. 13:24
Could not determine the dependencies of task ':app:uploadCrashlyticsMappingFilenRelease'. 처음에는 Firebase의 Crashlytics의 설정을 의심하였으나 현상은 도일하게 발생 하였습니다. 그래서 다른 부분을 확인중 com.flurry.android:analytics 에서 Google service에 의존성을 가지고 있는것을 발견 하였습니다. 그래서 Flurry를 제거후 빌드시 정상적으로 빌드되는것을 확인하였습니다. 그 라이브러리를 제거하고 빌드시 정상적으로 빌드된다면 해당 라이브러리와 Google 서비스 라이브러리와의 버전 충돌일 가능성이 높습니다.
-
Android TextView URL link 처리하기Android 2020. 12. 28. 15:35
android TextView 에서 URL 링크를 클릭하고 표시 하는 방법입니다. 아래의 옵션을 layout xml 의 TextView에 추가 해주면 됩니다. android:linksClickable="true" android:autoLink="web" ex> URL 링크의 색상은 Appthema 의 Accent 색상을 따라갑니다. 다른 색상을 사용 할 경우 styles.xml 에 style 을 추가하여 적용 합니다. ex> style.xml 그리고 링크에 밑줄이 표기되는 것을 제거하고 싶을 경우 아래의 코드를 커스텀 뷰로 추가하여 적용합니다. /** * AutoLink 기능에 의해 생성되는 링크에 밑줄이 표시되지 않게 하는 TextView * @author YMKim */ public class NoU..
-
[Android Studio] Design editor is unavailable until next project sync 해결Android/Error 2020. 10. 12. 10:48
안드로이드 스튜디오에서 xml 파일로 화면 디자인 확인시 Design editor is unavailable until next project sync 가 출력 되는 문제가 발생합니다. 이럴경우 File -> Invalidate Cashes / Restart 를 선택합니다. 선택창에서 Invalidate and restart 를 선택합니다. 다시 정상적으로 디자인이 ㅍ시되는것을 확인 할 수 있습니다.
-
ConstraintLayout에서 match_parent 가 작동 안될경우Android 2020. 9. 21. 12:17
ConstraintLayout 안에 있는 View 에 match_parent를 적용할경우 꽉차게 적용이 안되는 경우가 있습니다. 그럴경우 android:layout_width 와 android:layout_height 를 0dp 로 주고 app:layout_constraintStart_toStartOf ,app:layout_constraintTop_toTopOf, app:layout_constraintBottom_toBottomOf, app:layout_constraintEnd_toEndOf 를 "parent" 로 주면 비어는 View 도 ConstraintLayout에 꽉차게 들어가게 됩니다.
-
Hilt 공식 문서 번역본Android 2020. 7. 24. 00:19
https://www.charlezz.com/wordpress/wp-content/uploads/2020/07/Hilt-%E1%84%80%E1%85%A9%E1%86%BC%E1%84%89%E1%85%B5%E1%86%A8-%E1%84%86%E1%85%AE%E1%86%AB%E1%84%89%E1%85%A5-%E1%84%87%E1%85%A5%E1%86%AB%E1%84%8B%E1%85%A7%E1%86%A8%E1%84%87%E1%85%A9%E1%86%AB-v1.1-by-Charlezz.pdf Charlezz 님께서 번역해주신 Hilt 공식 문서 번역본 입니다. [원문링크] https://dagger.dev/hilt/ Hilt Hilt provides a standard way to incorporate Dagger ..