한가지 풀리지 않는 문제가 있어 질문드립니다.
custom view를 만들고 main.xml에 tag에 custom view를 기술하였습니다.
custom view는 전체 화면에 Notitle로 사용할 예정이었습니다.
그런데 main.xml 파레트 상에서 아래 메시지 창에 아래 메시지가 표시됩니다.
The following classes could not be instantiated:
- com.texture.TextureSurface (Open Class, Show Error Log)
See the Error Log (Window > Show View) for more details.
Tip: Use View.isInEditMode() in your custom views to skip code when shown in Eclipse
main.xml 내역 입니다.
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
tools:context="Texture" >
<com.texture.TextureSurface
android:id="@+id/mTextureView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</FrameLayout>
실제 디버깅 상에서도 Main Activity 에 onCreate 매소드 상에서
setContentView(R.layout.main); 에서 오류가 떨어지는 듯 합니다.
--- 로그 내역입니다. ---
11-05 02:35:12.304: E/AndroidRuntime(369): FATAL EXCEPTION: main
11-05 02:35:12.304: E/AndroidRuntime(369): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.texture/com.texture.Texture}: android.view.InflateException: Binary XML file line #9: Error inflating class com.texture.TextureSurface
11-05 02:35:12.304: E/AndroidRuntime(369): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
com.texture.TextureSurface 해당 뷰가 어떤내용인지 몰라서 정확한 답변을 드릴수는없겠지만 xml의 오류로 보기는 어렵고
com.texture.TextureSurface.class 부분에서 에러가 있을거같아요 패키지명 이 다르다던지 클래스명이 다른지 부터 확인해보시는게
좋을거같습니다.