본문 바로가기

Android12

[Android] 단말기 부팅 시 앱 자동 실행 (단말기 전원 껐다 켰을 때 앱 자동 실행) 단말기 부팅 완료 후 앱 자동 실행을 하기 위해서는 몇가지 셋팅 해야 할 것이 있다. - manifest 셋팅 ( app -> manifests -> AndroidManifest.xml 선택) - 퍼미션 등록 - 리시버 생성 (단말기 부팅 완료시 수행해야 할 거) BootReceiver 이름으로 java class 생성 - 생성한 리시버 manifest 에 등록 끝 2024. 3. 13.
[Android] AAPT: error: XML or text declaration not at start of entity. 디버그 실행 후 XML or text declaration not at start of entity. 라는 오류 발생 어김없이 stackoverflow 방문 https://stackoverflow.com/questions/6474741/error-error-parsing-xml-xml-or-text-declaration-not-at-start-of-entity layout resource 파일 ( 레이아웃파일.xml ) 이 문제가 있다는 거 case 1. 첫 문장 앞에 공백이 있는 경우 case 2. 동일한 네임스페이스 지정 문을 두번 지정 xml version="1.0" 인코딩="utf-8" 오류 발생한 xml 파일 보니 나는 case 2. 였다..... 하나 삭제하고 다시 빌드 하니 잘됨 2024. 3. 4.
[Android] java.lang.RuntimeException: com.intellij.util.io.PersistentEnumeratorBase$CorruptedException: _해결 앱 실행 후 이런 런타임 오류 발생 java.lang.RuntimeException: java.lang.RuntimeException: com.intellij.util.io.PersistentEnumeratorBase$CorruptedException: 아래 stackoverflow에서 캐시무효화를 하라, 프로젝트 경로에 있는 생성된 폴더를 삭제하라 등등 답변을 참고하여 https://stackoverflow.com/questions/39584672/errorjava-lang-runtimeexception-com-intellij-util-io-persistentenumeratorbase Error:java.lang.RuntimeException: com.intellij.util.io.PersistentE.. 2024. 3. 4.
[Android Studio] Do not treat position as fixed; only use immediately and call viewHolder.getAdapterPosition() to look it up later_ 해결 Recyclerview 구현하여 ClickEvent 추가 하니 Lint error 발생 '위치를 고정해서 쓰지 마세요' 라니 무슨말인지 이해가 안가지만 위에 나와있는대로 postion을 사용했던 곳에 getAdapterPosition() 함수 사용하니 getAdapterPosition은 더이상 사용하지 않음 그래서 재구글링 결과 getBindingAdapterPosition(); - adapter의 position getAbsoluteAdapterPosition(); - recyclerview의 position 난 adapter를 중첩해서 사용하진 않았으니 뭘 사용하든 같은 값으로 반환 되서 상관 없지만 중첩해서 사용할 경우 상황에 맞게 써야 할듯 positon을 사용한 곳에 getAbsoluteAdap.. 2023. 12. 28.
LIST