2017-04-09 214 views
0

我正在Android Studio中開發應用程序,但是當我對GUI進行更改時,在設備上運行應用程序後沒有顯示更改。Android Studio不顯示更改

我已經試過:

  1. 重建
  2. 禁用即時運行
  3. 更新AndroidStudio
  4. 在每個新的部署

任何想法卸載從設備的應用程序?

--- ---代碼

<TextView 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:textAppearance="?android:attr/textAppearanceLarge" 
    android:text="@string/homeTitle" 
    android:id="@+id/titleText" 
    android:textSize="50dp" 
    android:textColor="#000000" 
    android:layout_alignParentTop="true" 
    android:layout_centerHorizontal="true" /> 

<Switch 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:id="@+id/enableSwitch" 
    android:text="@string/enableString" 
    android:layout_marginTop="15dp" 
    android:layout_below="@+id/titleText" 
    android:layout_centerHorizontal="true" /> 

<Switch 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="@string/brightness_string" 
    android:id="@+id/brightnessSwitch" 
    android:layout_below="@+id/enableSwitch" 
    android:layout_centerHorizontal="true" 
    android:layout_marginTop="33dp" /> 

<Switch 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="@string/gpsManagementString" 
    android:id="@+id/gpsSwitch" 
    android:layout_below="@+id/brightnessSwitch" 
    android:layout_centerHorizontal="true" 
    android:layout_marginTop="19dp" /> 

<Switch 
    android:layout_width="wrap_content" 
    android:layout_height="wrap_content" 
    android:text="@string/commsManagementString" 
    android:id="@+id/commsSwitch" 
    android:layout_below="@+id/gpsSwitch" 
    android:layout_centerHorizontal="true" 
    android:layout_marginTop="19dp" /> 

<Button 
    android:layout_width="160dp" 
    android:layout_height="135dp" 
    android:text="@string/options_string" 
    android:id="@+id/button" 
    android:layout_alignParentBottom="true" 
    android:layout_alignParentLeft="true" /> 

<Button 
    android:layout_width="160dp" 
    android:layout_height="135dp" 
    android:text="@string/about_string" 
    android:id="@+id/button2" 
    android:layout_alignParentBottom="true" 
    android:layout_alignParentRight="true" /> 

+0

那麼這些變化是什麼? –

+0

目前我只是試圖在XML中創建一個UI,但它看起來像不管我正在更改它是不是顯示 –

+0

你必須添加相關信息和代碼片段到您的帖子,否則這將被關閉不久。 –

回答

0

首先在主菜單中選擇File |使緩存/重新啓動失效。

第二次嘗試刷新佈局

在佈局泛第三查找錯誤,並嘗試修復它。

希望它有幫助。

0

嘗試禁用即時運行: 轉到:文件>設置>構建>執行>部署> InstantRun並將其禁用。 它爲我工作