我对此完全陌生,我按照此页面的指南进行操作,http://developer.android.com/training/basics/firstapp/building-ui.html
我复制他们的代码:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<EditText android:id="@+id/edit_message"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="@string/edit_message" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/button_send" />
</LinearLayout>
但是当保存它时,它会自动在最底部创建一个新行:
<menu xmlns:android="http://schemas.android.com/apk/res/android"></menu>
它给了我一条关于这个特定行的错误消息。我搜索论坛,建议似乎取消了这条线,但这是不可能的(!)。保存文件时它会自动返回。
有什么帮助吗?