我有这个 XML 文件:
<?xml version="1.0" encoding="UTF-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button android:text="Disable Filter" android:background="@drawable/buttons" style="@style/ButtonText" android:layout_weight="25" />
<ImageView android:id="@+id/imageFilter" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="75" />
<HorizontalScrollView android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:id="@+id/horizontal" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent">
</LinearLayout>
</HorizontalScrollView>
</LinearLayout>
只要我将 android:id="@+id/btnFilterPreview"
添加到 Button
我的应用程序就会停止工作。这是为什么?
最佳答案
在 Netbeans 中解决问题,右键单击项目并选择:Clean and Build
关于android - 添加安卓 :id to xml breaks entire app,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13223388/