我正在嘗試創建一個按鈕。我之前做過這樣的事情,但現在我得到了一個錯誤,我無法找出它是什麼。我想我已經得到了在XML文件中的問題,但無法找到它:SAndroid - 佈局錯誤
因此,有我的XML:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="vertical" >
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<ImageButton
android:id="@+id/login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="115dp"
android:layout_marginTop="80dp"
android:src="@drawable/login_button" />
</RelativeLayout>
我試圖實施某種Facebook登錄。我正在使用easyfacebook sdk。因此,這裏是java的代碼,我想實現的登錄按鈕:
我得到的消息是:
W/WebCore的(29941)後,無法獲得viewWidth第一佈局
E/SkLayout_wtle(29941):佈局錯誤:106寬度:0 ellipsizedWidth:0
W/InputManagerService(1171):窗口已經聚焦,忽略聚焦增益的:com.android.internal。 view.IInputMethodClient $ S tub $ Proxy @ 405c4e68
你能更具體嗎? 什麼是ImageButton的父視圖。 何時何地發生此錯誤。 我們可以看到代碼片段,因此更易於調試。 – Pankaj 2012-02-25 16:27:21
對不起。當我點擊按鈕時,我會收到這些消息。 – user1162316 2012-02-25 16:31:06
第5行是否要讀取「... 80dp」而不是「... 80sp」? – Jon 2012-02-25 16:34:58