Android - 具有自定义视图的android.view.InflateException

Mik*_*keT 5 android

嗨我继续得到这个错误它在第9行xml的android.view.InflateException

继承人我的xml:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>

<com.SpaceShot.single android:id="@+id/single1"
 android:layout_width="wrap_content" 
 android:layout_height="wrap_content">

 </com.SpaceShot.single>

<ListView android:id="@+id/highScores"
 android:layout_width="wrap_content"
 android:layout_height="wrap_content">
</ListView>
</FrameLayout>
Run Code Online (Sandbox Code Playgroud)

JSc*_*Ced 15

你看过这个类似的错误吗?在这种情况下,它表示你应该在你的自定义UI项2构造函数中:
- 一个使用Context参数
- 一个使用Context和AttributeSet