"build": {
"development": {
"developmentClient": true,
"distribution": "internal",
"channel": "development"
},
"preview": {
"distribution": "internal",
"channel": "preview"
},
"preview2": {
"android": {
"buildType": "apk"
}
},
"preview3": {
"android": {
"gradleCommand": ":app:assembleRelease"
}
},
"preview4": {
"developmentClient": true
},
"production": {
"channel": "production"
}
},
command 에서 adb 실행, 없으면
https://developer.android.com/studio/releases/platform-tools?hl=ko
위 링크로 다운 받아서, 다운 받은 파일 경로로 들어가서 adb 실행
note 8에서 개발자 옵션 모드로 전환 : https://www.kuccblog.net/1766
android file transfer 실행. (https://www.android.com/filetransfer/)
에러가 나도 파일이 오픈되면 커맨드 창에서
adb devices
를 실행시키면 List of devices attached 에 목록이 뜨면 연결이 가능해는 거임
haryongjung@haryongs-MacBook-Pro downloads % adb install android.apk\
Performing Streamed Install
adb: failed to install android.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.enesdyaz.cargo4u signatures do not match the previously installed version; ignoring!]
haryongjung@haryongs-MacBook-Pro downloads % adb uninstall com.enesdyaz.carg
o4u
Success
haryongjung@haryongs-MacBook-Pro downloads % adb install android.apk
Performing Streamed Install
Success
보통 이전버전이 깔려져 있으면 지우고 다시 설치를 해야 함.
a. Mac에 있는 file transfer 를 실행시키면 - 아무것도 없다고 뜨며
b. usb를 안드로이드 폰에 꼽으면 "허용" 이라는 메시지가 뜨는데 허용을 누르자마자!!!
c. mac에 떠 있는 메시지를 OK를 누르고 그 다음에 안드로이드 파일창에 있는 SM_N950F를 눌러야
파일이 전송이 가능하다.빨리 OK를 누르는게 중요. 그리고 순서가 달라지면 SM_N950F를 눌러도 반응이 없어진다.
안드로이드 폰에 내 파일을 누르면 전송받은 android.apk 파일을 실행. 그러면 자동으로 인스톨이 됨.
여기서 인스톨이 안되면 (https://changwoos.tistory.com/718)
안드로이드폰의 android.apk 파일 실행후 앱을 열고
맥의 android file transfer 를 실행시켜 폰을 연결시킨 후
adb devices로 연결되어 있는 상태를 확인 후 연결이 되었다면
adb logcat —pid=$(adb shell pidof -s com.enesdyaz.cargo4u)
위 명령어를 치면 시스템 로고가 보이게 된다. 검색하여 system.err 를 찾아서 확인하면 됨
에러는 아래와 같이 나왔다.
o: [type: MOBILE[] - MOBILE, state: DISCONNECTED/DISCONNECTED, reason: (unspecified), extra: (none), failover: false, available: true, roaming: false, metered: false]
03-09 11:39:27.164 3841 7600 W System.err: java.lang.NumberFormatException: For input string: ""
03-09 11:39:27.164 3841 7600 W System.err: at java.lang.Integer.parseInt(Integer.java:620)
03-09 11:39:27.164 3841 7600 W System.err: at java.lang.Integer.parseInt(Integer.java:643)