2012-08-09 78 views
0

我使用Eclipse插件嘗試編寫一個Android應用程序,我在網上查找,並且有一些eclipse沒有創建的文件夾(特別是res /)。 ,我不能永遠運行該程序的任何想法,我也得到這些錯誤:?Eclipse Android插件不會創建所有必需的文件夾

[2012-08-09 12:17:08 - WifiCheck] Could not find WifiCheck.apk! 
[2012-08-09 12:17:16 - Wififind] res\layout\activity_wifi_find.xml:0: error: Resource  entry activity_wifi_find is already defined. 
[2012-08-09 12:17:16 - Wififind] res\layout\activity_wifi_find.out.xml:0: Originally defined here. 
[2012-08-09 12:17:16 - Wififind]  C:\Users\Law\workspace\Wififind\res\layout\activity_wifi_find.out.xml:1: error: Error parsing XML: no element found 
[2012-08-09 12:17:18 - Wififind] res\layout\activity_wifi_find.xml:0: error: Resource entry activity_wifi_find is already defined. 
[2012-08-09 12:17:18 - Wififind] res\layout\activity_wifi_find.out.xml:0: Originally defined here. 
[2012-08-09 12:17:18 - Wififind] C:\Users\Law\workspace\Wififind\res\layout\activity_wifi_find.out.xml:1: error: Error parsing XML: no element found 
[2012-08-09 12:18:04 - Wififind] R.java was removed! Recreating R.java! 
[2012-08-09 12:18:04 - Wififind] res\layout\activity_wifi_find.xml:0: error: Resource entry activity_wifi_find is already defined. 
[2012-08-09 12:18:04 - Wififind] res\layout\activity_wifi_find.out.xml:0: Originally defined here. 
[2012-08-09 12:18:04 - Wififind] C:\Users\Law\workspace\Wififind\res\layout\activity_wifi_find.out.xml:1: error: Error parsing XML: no element found 
[2012-08-09 12:18:46 - Wififind] res\layout\activity_wifi_find.xml:0: error: Resource entry activity_wifi_find is already defined. 
[2012-08-09 12:18:46 - Wififind] res\layout\activity_wifi_find.out.xml:0: Originally defined here. 
[2012-08-09 12:18:46 - Wififind] C:\Users\Law\workspace\Wififind\res\layout\activity_wifi_find.out.xml:1: error: Error parsing XML: no element found 
[2012-08-09 12:18:47 - Wififind] res\layout\activity_wifi_find.xml:0: error: Resource entry activity_wifi_find is already defined. 
[2012-08-09 12:18:47 - Wififind] res\layout\activity_wifi_find.out.xml:0: Originally defined here. 
[2012-08-09 12:18:47 - Wififind] C:\Users\Law\workspace\Wififind\res\layout\activity_wifi_find.out.xml:1: error: Error parsing XML: no element found 
[2012-08-09 12:32:55 - WifiCheck] ------------------------------ 
[2012-08-09 12:32:55 - WifiCheck] Android Launch! 
[2012-08-09 12:32:55 - WifiCheck] adb is running normally. 
[2012-08-09 12:32:55 - WifiCheck] Could not find WifiCheck.apk! 

編輯:有沒有XML文件只是Java文件稱爲R,MainActivity和BuildConfig

+0

我想你正在編譯並嘗試運行這些佈局文件,刪除所有out.xml文件,並編譯和運行項目 - 右鍵單擊​​項目名稱,然後運行它。 – rajpara 2012-08-09 17:20:01

回答

2

there's some folders that eclipse isn't creating (specifically res/)

根據您的錯誤日誌輸出,存在res/。刪除res\layout\activity_wifi_find.out.xml文件,並顯示您的日誌中的錯誤將消失的錯誤。

+0

避免此錯誤的最佳方法是在突出顯示Java源文件而不是xml文件時按運行按鈕。 – Krylez 2012-08-09 17:19:55

+0

@Krylez:奇怪的是我沒有碰到* ages *中的'out.xml'文件問題。事實上,我只是試圖重現它(打開佈局文件,按下運行),它工作得很好。這肯定是一個問題,只是通過運行,但我懷疑還有其他一些不太常見的原因導致OP失敗。 – CommonsWare 2012-08-09 17:21:54

+0

沒有xml文件。只有名爲R,MainActivity和BuildConfig的java文件。 – Magn3s1um 2012-08-09 17:23:09

相關問題