'2020/06/09'에 해당되는 글 2건

  1. 2020.06.09 retrofit 어렵네..
  2. 2020.06.09 Android Logcat
Programming/android2020. 6. 9. 17:27

패키지 하나 쓰기 왜케 어럽냐..

 

okhttp를 따로 끌어와야 하나? 자동으로 끌려온다는 말이 있어서 안끌어왔더니 에러난다.

 

근데 구버전인지.. 지금 버전에 하면 compile 대신 implementation을 쓰라고 경고를 띄운다.

그리고 최신버전은 2.6.1 인데 2.3.0 으로 떨어지다니..

compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'

[링크 : https://www.journaldev.com/13639/retrofit-android-example-tutorial]

 

+

Call() 에 결과 없이(JSON으로 받지 않고) 처리하는 방법

@GET("path/to/void/api")
Call<Void> garageMove();

[링크 : https://stackoverflow.com/questions/47237106/retrofit-2-3-url-call-without-return-value]

 

+

2020.06.16

어노테이션 설명이 있어서 좀 보기가 수월한 듯.

 

[링크 : https://kor45cw.tistory.com/5]

Posted by 구차니
Programming/android2020. 6. 9. 17:23

기본으로 될 줄 알았는데, 자바를 너무 만능으로 생각한걸까..

아무튼 logcat 이라는 기능이 android.util.Log 패키지로 존재하기 때문에 사용하려면 import 해주어야 한다.

 

import android.util.Log;

 

사용 방법은 다음과 같이 

Error / Warning / Information / Debug / Verbose 의 약자로 붙이면 된다.

Log.e(String, String) (오류)
Log.w(String, String) (경고)
Log.i(String, String) (정보)
Log.d(String, String) (디버그)
Log.v(String, String) (상세)

[링크 : https://developer.android.com/studio/debug/am-logcat?hl=ko]

Posted by 구차니