일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- 셀트리온
- 토익이메일
- 국제유가
- toeice-mail
- S&P
- Java
- 금리인상
- Intent
- LG전자
- 네마녀의날
- 나스닥
- 영어메일쓰기
- 어학·외국어
- e-mailwriting
- 화승엔터프라이즈
- 무역전쟁
- 주식시황
- dataframe
- 사드보복완화
- Python
- englishwriting
- 안드로이드
- ruby
- 시황
- 다우산업
- 파이썬
- android
- 다우
- 트럼프
- 영어메일
- Today
- Total
Developer MJ Story
[Android/Bluetooth] Android Bluetooth chat sample run time error(NullPointerException) 해결 방법 본문
[Android/Bluetooth] Android Bluetooth chat sample run time error(NullPointerException) 해결 방법
집근처 2014. 8. 29. 09:30Android를 개발할 때 가장 refence로 android에서 제공하는 sample source를 많이 활용합니다.
그 중에서 Bluetooth 관련된 기능들을 사용할 때 가장 많이 참고하는 것이 Bluetooth chat source입니다.
얼마 전 Bluetooth chat import 후 실행하니 아래 그림과 같은 error가 딱!
오잉~? 전 아무것도 손댄 것 없이 install 시켰는데… 그래서 몇 번을 더 install 해봤지만, 모두 실패…
일단 error가 발생한 bluetoothChat.java line 236 소스입니다.
private final void setStatus(int resId) {
final ActionBar actionBar = getActionBar();
actionBar.setSubtitle(resId);
}
흠…. 전혀 문제가 없어 보이는데…어찌 된것인가…
actionBar?.. actionBar라고 하면, Honeycom에서 추가된 기능인데…라고 생각할 던 찰라
console에 빨간 글씨로 API level…..
설마 API level 문제인가? 하는 마음에 AndroidManifest.xml 확인해보니.
minSdkVersion이 1로 되어 있었다.
<uses-sdk minSdkVersion="1" />
actionBar는 honeyCom에서 추가 되었으니 10이상이어야 한다.
AndroidManifest.xml에 uses-sdk를 아래와 같이 변경하면 잘 된다.
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="19" />
구글 개발자들도 이런 실수?를 하다니…ㅋ
실수가 아니면? 뭘까? 뭔가 의미가 있는 건가?? 알 수 없다.