구글링을 해서 전화수신 기능을 테스트하다보니 ITelephony 에서 에러가 나온다.
해결방법은 첨부파일을 다운로드 받아서 Android Studio app/src/main/ 폴더에서 압축을 풀면 된다.
app\src\main\java\com\android\internal\telephony\ITelephony.aidl 에 파일이 복사된다.
압축파일은 다른 폴더로 옮기거나 삭제한다.
이제 에러 표시가 되는 곳에서 Alt + Enter 키를 누르면 아래 화면이 나온다. 여기에서 Create interface 'ITelephony' 를 선택한다.
com.android.internal.telephony 를 입력한다.
그러면 Interface 파일이 생성된다.
아래 코드를 복사하여 붙여넣기 한다.
붙여넣기는 http://stackoverflow.com/questions/31473793/where-to-copy-itelephony-java-in-android-studio-and-how-to-import-it-please-don 에서 복사해서 넣으면 된다.
package com.android.internal.telephony;
public interface ITelephony {
void answerRingingCall();
boolean endCall();
void silenceRinger();
boolean showCallScreenWithDialpad(boolean showDialpad);
}
이렇게 하면 에러 메시지가 사라진다.
'안드로이드 > 버그탈출' 카테고리의 다른 글
showDialog(int) from the type Activity is deprecated (0) | 2017.04.05 |
---|---|
setlatesteventinfo() is deprecated (0) | 2017.04.05 |
Butter Knife 에러 해결 (0) | 2017.04.03 |
LG G5 개발자 모드 설정(USB 디버깅) (4) | 2017.03.29 |
Android 6.0 이상 권한 오류 해결방법 (0) | 2017.03.24 |