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
- 베트남여행데이터
- 해외데이터비교
- 컴파일
- log
- 국가별데이터비교
- 유럽여행데이터
- ethereum
- 2025년플레이스테이션게임
- convert
- 안드로이드
- ps5게임top10
- kotlin
- 유럽여행유심
- eSIM
- Realm
- 스트리밍
- 데이터에그
- test
- 2025년플스게임
- Gradle
- 해외여행데이터
- Glide
- error
- firebase
- 유심구매팁
- ps5게임순위
- Exception
- C
- 다윈
- Android
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