Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
29 | 30 |
Tags
- convert
- 웹기획자
- 안드로이드
- 데이터분석
- 데이터해석능력
- kotlin
- 기획자역량
- 데이터활용능력
- eSIM
- firebase
- 기획자
- 해외여행데이터
- 스트리밍
- 다윈
- Exception
- 사용자중심기획
- 앱기능설명
- 컴파일
- log
- ethereum
- Glide
- C
- error
- 앱기획자
- test
- Android
- 글라이드로앱만들기
- Gradle
- 노코드활용
- Realm
Archives
- Today
- Total
날마다 새롭게 또 날마다 새롭게
Android Run Error - Layout Error 본문
1. layout.xml 아래와 같이 작성 후,
<SurfaceView
android:id="@+id/surface"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
2. Java코드에서 MyCameraSurface mSurface = (MyCameraSurface)findViewById(R.id.surface);라고 작성하면 error 발생 함.
문제점 : layout의 object와 MyCameraSurface Class가 맞지 않아서 발생한 error로 예상됨.
해결 : xml 파일 내용 수정으로 해결됨.
<com.example.smarttv.MyCameraSurface
android:id="@+id/preview"
android:layout_width="300dip"
android:layout_height="fill_parent"
/>
Comments