我有一个相当简单的xml文件,它有一个图像按钮。该图像在图形布局xml设计器上显示得很好,运行开发版本时显示正常,但只要创建签名的apk文件并运行它,图像就不再显示。这只是一个空的按钮。我想不出为什么,有什么想法?该XML文件是这样的:Android:Drawable not showing up
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/navigation_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/navigation_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:text="TextView"
android:textAppearance="?android:attr/textAppearanceLarge" >
</TextView>
<SeekBar
android:id="@+id/navigation_seekbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:padding="5dp" >
</SeekBar>
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp" >
<ImageButton
android:id="@+id/part_select_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/chapter_select" >
</ImageButton>
<Button
android:id="@+id/navigation_ok_button"
android:layout_width="75dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/ok" >
</Button>
<Button
android:id="@+id/navigation_cancel_button"
android:layout_width="75dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:text="@string/cancel" >
</Button>
</LinearLayout>
图像0是一个相当小的(41 * 41),png文件是在res /绘制的文件夹。
我不想将它放在特定的屏幕密度文件夹中,因为我希望所有设备都能够在不复印的情况下使用图像。动态设置图像不会改变任何内容,它仍然不会在签名构建中显示出来。谢谢你尝试Luk。 – odiggity