2017-03-02 41 views
0

我是想用這種方法來重新定位文本框和按鈕:錯誤:執行失敗「的應用程序:mergeDebugResources」

How to change the position of layout when the orientation of screen change in android?

但是當我嘗試運行它,它返回以下錯誤:

Error : Execution failed for 'app:mergeDebugResources' 
Error:Execution failed for task ':app:mergeDebugResources'. 

C:\Users\My.Name\AndroidStudioProjects\MyApplication2\app\src\main\res\layout\layout-land: Error: The file name must end with .xml

我應該如何解決這個問題? layout-land文件夾內的文件已經是一個xml文件。

+0

'文件名必須以.xml'結尾......閱讀錯誤 –

+0

編輯了該問題。謝謝。 –

+0

嗯,我的回答,以及你已經鏈接並且應該仔細閱讀的內容應該解決你的問題。 –

回答

1

您創建res\layout\layout-land

當你應該創建res\layout-land

land scape XML文件應該與其對應的縱向模式文件名稱相同。

相關問題