2013-02-12 134 views
0

任何人都可以從我的佈局看到任何錯誤?我將其用作活動佈局,但應用程序已停止。 XML是使用DroidDraw創建的。該應用程序是三星GT-N7000測試,Android的版本4.0.4DroidDraw生成的android佈局錯誤?

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout 
    android:id="@+id/widget32" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    xmlns:android="http://schemas.android.com/apk/res/android"> 
    <Button 
     android:id="@+id/bt_lihat_komoditas" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Lihat Komoditas" 
     android:layout_below="@+id/widget35" 
     android:layout_alignParentRight="true" /> 
    <TableLayout 
     android:id="@+id/widget35" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:orientation="vertical" 
     android:stretchColumns="1" 
     android:layout_alignParentTop="true" 
     android:layout_alignParentLeft="true"> 
     <TableRow 
      android:id="@+id/widget36" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:orientation="horizontal"> 
      <TextView 
       android:id="@+id/widget38" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="Pilih Kategori" /> 
      <Spinner 
       android:id="@+id/spin_kategori" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" /> 
     </TableRow> 
     <TableRow 
      android:id="@+id/widget37" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:orientation="horizontal"> 
      <TextView 
       android:id="@+id/widget40" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="Pilih Komoditi" /> 
      <Spinner 
       android:id="@+id/spin_komoditi" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" /> 
     </TableRow> 
     <TableRow 
      android:id="@+id/widget42" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:orientation="horizontal"> 
      <TextView 
       android:id="@+id/widget44" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:text="Pilih Tipe" /> 
      <Spinner 
       android:id="@+id/spin_tipe" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" /> 
     </TableRow> 
    </TableLayout> 
</RelativeLayout> 

-

問題解決了! 我只是清理並建立項目(我使用NetBeans),它工作正常。也許這個bug是在nandroid上。感謝您的關注。

+0

你遇到了哪一個確切的問題? – poitroae 2013-02-12 09:40:42

+0

向我們展示logcat日誌... – 2013-02-12 09:42:59

+0

@poitroae,我使用這個佈局一次,它工作正常,直到我改變微調ID。我從Netbeans運行應用程序,但它剛剛崩潰。 問題已解決!我只是清理和建立項目(我使用netbeans),並且它工作正常。也許這個bug是在nandroid上。 – 2013-02-12 10:33:36

回答

0

只是一個盲猜:完全清理和重建項目(s)。這驚人地經常幫助解決像這樣的問題(不兼容和缺少ID等)

+0

這是正確的! – 2013-02-12 10:35:53