본문 바로가기
DEVELOPMENT

[Kotlin - Android Development] 개발하면서 있었던 크고 작은 문제들

by 200% 2021. 9. 16.

~21.09.16

 

이것 전에도 훨씬 많은 문제들을 겪었는데 다 까먹었고 스샷이 없어서 있는 것부터 쓰기로...

(1) Github로 push하려고 했는데 발생한 에러

Push failed
Invocation failed Unexpected end of file from server ~~~

원인: Github에 연결할 때 토큰을 이용했는데 그게 만료됨

해결: 토큰 재발급 후 다시 연결

방법: 전에 발급받은 것으로 다시 들어가서 잃어버렸음->기간 빵빵하게 설정하고 다시 발급받기

안드로이드 스튜디오 상단의 "File"->"Setting"->"Version Control"->"Github" 들어가보면 막 만료되었네 어쩌고저쩌고 뜸

그거 누르고 토큰으로 다시 연결하면 해결!

 

 

(2) Fragment에서 RecyclerView 사용할 때

다른 프로젝트에서 실험하고 잘 작동해서 본 프로젝트로 복붙했는데 에러남

(Type mismatch: inferred type is PlannerFragement but Context! was expected)

해결: this를 getContext()로 바꾸기

참고:

https://okky.kr/article/695389

 

OKKY | 안드로이드 recyclerview+fragment에서 아이템 출력 오류

제가 navigation drawer activity를 이용해서 fragment안에 recylerview를 넣어서 아이템을 두개이상 출력할려고 하는데요 일단 두개를 넣었는데 하나밖에 출력이 안됩니다. GridLayoutManager layoutManager new GridLayo

okky.kr

 

(3) java.lang.NullPointerException: tv_current_month_of_week must not be null

 

참고:

https://pickhada.tistory.com/30

 

Fragment에서 RecyclerView 사용 시 Null Point Exception 발생 시 해결방법(Kotlin)

Fragment에서 RecyclerView를 이용하여 체크리스트를 구현해 보았습니다. 그런데 Activity에서 구현할 때와 다르게 계속 Null Point Exception이 발생되면서 어플이 강제종료 되는 현상이 발생 되었습니다. 분

pickhada.tistory.com