我已經更新了我的機器人工作室,現在我在我main.xml中的一個問題,它會顯示以下錯誤: element LinearLayout must be declared
元素的LinearLayout必須聲明
這是我的代碼:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="fill_parent"
android:layout_width="fill_parent"
android:gravity="center_vertical|center_horizontal"
>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/monBouton"
android:text="Cliquez ici !"
>
</Button>
</LinearLayout>
這是錯誤消息: 錯誤:執行任務':app:compileDebugJava'失敗。
Compilation failed; see the compiler error output for details.
錯誤:無法找到符號變量action_settings
我該如何解決呢?
包括完整的錯誤信息。 – pyus13
包含完整的錯誤信息,謝謝 – abdoBim
我有同樣的錯誤,原因是因爲我把xml文件放在'drawable /'裏面而不是'layout /'目錄。 –