2014-12-04 40 views
-1

我必須更改我的應用程序啓動器佈局。所以我用Linearlayout和背景圖片做了一個。在構建Android Studio時沒有錯誤,但是當我嘗試啓動它時崩潰。Linearaveout在laucher中崩潰時應用程序

這裏是我的佈局XML:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:orientation="horizontal" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:background= "@drawable/newgame" 
android:baselineAligned="false"> 

<ImageView 
    android:layout_width="293dp" 
    android:layout_height="214dp" 
    android:id="@+id/imageButton" 
    android:layout_gravity="center_vertical" 
    android:src="@drawable/apple" 
    android:scaleType="fitCenter" 
    android:adjustViewBounds="true" 
    android:layout_marginLeft="50dp" 
    android:clickable="true" /> 


</LinearLayout> 

我甚至沒有幫助刪除ImageView的。使用Linearlayout有什麼根本性錯誤?我舊的佈局(和其他我已經嘗試過的工作很好)感謝您的幫助!

+0

發佈錯誤和logcat – 2014-12-04 17:24:54

回答

0

這個問題似乎在我的模擬器中。在佈局中刪除背景圖像解決了問題。我也增加了內存堆大小。感謝幫助!