アンドロイドアプリケーションにカスタムボタンを追加できません。コンソールで実行すると、Logcatで次のエラーが表示され、強制的に閉じることができます。誰でもこの問題を解決できますか?アンドロイドのカスタムボタン
04-18 10:59:00.785:E/AndroidRuntime(368):java.lang.RuntimeException:アクティビティを開始できませんでした。ComponentInfo {com.bsm.rssreader/com.bsm.rssreader.headlines}:android.view .InflateException:バイナリXMLファイルの行#75:エラー膨らまクラス
ここでは私のXMLファイルで、
<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
>
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_weight="14.08"
android:scaleType="fitXY"
android:src="@drawable/logo" />
<HorizontalScrollView
android:id="@+id/horizontalScrollView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:fillViewport="true"
android:scrollbars="none" >
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</HorizontalScrollView>
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="246dp"
android:layout_weight="26.53" >
<ListView
android:id="@+id/listView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:divider="#b5b5b5"
android:dividerHeight="1dp"
android:listSelector="@drawable/list_selector" />
</FrameLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="30dp" >
<ImageView
android:id="@+id/imageView2"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:scaleType="fitXY"
android:src="@drawable/foot" />
<Button
android:id="@+id/about"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:background="@drawable/aboutbutton" />
<Button
android:id="@+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_toLeftOf="@+id/about"
android:background="@drawable/ratebtn" />
</RelativeLayout>
</LinearLayout>
</TabHost>
http://pastebin.com/FgnVBBwjが完了Logcatのためにこれを確認することができます。 –
あなたのxmlファイルを投稿してください... – 5hssba
この問題は、カスタムボタンを追加した場合にのみ発生します。 –