티스토리 뷰
프레임워크 및 라이브러리 공부/Ionic
Ionic Kakao plugin 설치 시 오류 해결(View cannot be converted to ImageView, TextView, ListView, Button)
Yolo진우 2019. 3. 19. 18:38
아이오닉에서 카카오 플러그인을 설치 후 Android 실행 시 아래와 같은 에러들이 나온다.
에러의 내용들을 상세히 보면 아래와 같다.
TextView textView = convertView.findViewById(KakaoResources.login_method_text); // View cannot be converted
ImageView imageView = convertView.findViewById(KakaoResources.login_method_icon); // View cannot be converted
ListView listView = dialog.findViewById(KakaoResources.login_list_view); // View cannot be converted
Button closeButton = dialog.findViewById(KakaoResources.login_close_button); // View cannot be converted
위와 같은 현상은 낮은 complieSdkVersion 문제이며, 호환성을 위해 작업이 필요하다.
경로: /plugins/cordova-plugin-kakao-sdk/src/android/KakaoCordovaSDK.java 파일을 열은 후
위의 내용들을 찾아 아래와 같이 수정해준다.
TextView textView = (TextView) convertView.findViewById(KakaoResources.login_method_text);
ImageView imageView = (ImageView) convertView.findViewById(KakaoResources.login_method_icon);
ListView listView = (ListView) dialog.findViewById(KakaoResources.login_list_view);
Button closeButton = (Button) dialog.findViewById(KakaoResources.login_close_button);
그리고 다시 실행을 하면 오류가 해결 된 것을 볼 수 있다.
이 오류 관련하여 수정하여 git에 올려놓았다.
https://github.com/JinwooPark94/cordova-plugin-kakao-sdk
감사합니다.
오늘도 해피 코딩하세요.
'프레임워크 및 라이브러리 공부 > Ionic' 카테고리의 다른 글
Ionic 시스템 글자 확대 시 앱에서 레이아웃이 깨지는 현상 (네이티브 앱 오류) (0) | 2018.07.21 |
---|
댓글
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
TAG
- Es5
- useState
- TypeScript
- useEffect
- NestJS
- 리엑트
- 가상돔
- Function Component
- react
- 웹사이트
- website
- array
- window
- Prototype
- 함수 컴포넌트
- HTML
- 클래스형 컴포넌트
- this
- Let
- 깃헙
- virtual dom
- string
- JavaScript
- github
- scope
- Angular
- const
- ES6
- 클래스 컴포넌트
- class component
최근에 올라온 글
- Total
- Today
- Yesterday