본문 바로가기

Android Studio

(5)
[Android Studio] USB 케이블이 없을 때 와이파이로 디버깅 연결하기 들어가는 글.. 전에 ADB 무선 연결과 관련하여 포스팅을 작성한 적이 있습니다 https://ohdbjj.tistory.com/41 [Android Studio] adb 무선 연결(adb tcpip & adb connect) USB선을 통해 안드로이드 디버깅을 하는 경우, 연결 단자 또는 연결선의 문제로 연결이 끊길 때가 있습니다. 그래서 전 폰의 배터리 문제도 있고 연결이 끊기는 문제 때문에 무선 연결을 선호하 ohdbjj.tistory.com 위 방법의 단점은 최소 1회의 유선 연결이 필요하단 점, adb 설정과 shell을 열어야하는 부분인데 Android Studio가 발전되면서 스튜디오 자체에 무선 연결 기능이 추가되었습니다 공식 문서 https://developer.android.com/st..
[Android Studio] Auto Import 활성화 상단 탭에 있는 [File > Settings > Editor > General > Auto Import] Add unambiguous imports on the fly 활성화 주의할 점은 이름이 같은 클래스, 인터페이스 등이 여러 개 있으면 Auto Import가 안된다. 안드로이드에서는 android.app.Fragment 와 androidx.fragment.Fragment 이렇게 2개가 있어서 Auto Import가 되지 않는다. 그래서 난 android.app.Fragment는 deprecated 되었기 때문에 Auto Import와 Code Completion에서 제외시키도록 설정했다. [Exclude from import and completion]에 추가를 해주면 된다.
[Android Studio] sdk 버전 별 점유율 확인 Minimum SDK를 정하기 위해 sdk 버전 별 점유율을 확인하고 싶을 때가 있습니다. New Project > Configure Your Project에서 Help me choose 클릭 참조 https://www.xda-developers.com/android-version-distribution-statistics-android-studio/ How to find the Android Version Distribution statistics in Android Studio Google no longer shows the Android Version Distribution statistics on the web. Instead, you'll find them in Android Studio. ww..
[Android Studio] 불필요한 import 정리 app 우클릭 >> Optimize Imports app이 아닌 특정 package나 java 파일을 우클릭해도 존재한다. 단축키 ctrl + alt + o (Windows) ctrl + option + o (MAC)
[Android Studio] 디버깅 모드에서 breakpoint가 작동하지 않을 때 Android Studio에서 개발을 하면서 디버깅을 위해 breakpoint를 걸고 디버깅을 시작했는데 breakpoint의 모양이 취소 모양이 되면서 디버깅을 할 수 없었습니다. 구글링을 통해 알아낸 방법으로 저는 해결이 되었습니다. buildTypes{ debug{ minifyEnabled false // 저 같은 경우엔 난독화를 true로 하여서 디버깅이 되지 않았습니다 debuggable true ... } ... }