Type R is already defined error

來源:互聯網
上載者:User

標籤:android   http   java   io   type   amp   

今天import a project, 編譯時間提示Type R is already defined error, google, stackoverflow,  找到一個solution, 

"The type R is already defined"

That‘s the message you get in Eclipse if you try to build the Funambol Android Sync Client. Reason is that you have checked two Builders that try to generate the same class. You just have to uncheck the Java-Builder from Project->Properties->Builders. Then the application even works fine in the Emulator.

去掉Java-Builder 時, 出現一個warning, 照做後, 編譯ok 了, 但是debug 過程中出現wierd錯誤, 比如clean, rebuild 後修改的地方沒有生效,

都要抓狂了~@[email protected]#[email protected]#$,  後來想起那個warning, 果斷恢複原來設定, 再google, 發現原來時src 目錄下 也有個 R.java 導致的, delete 後clean & rebuild, test ok. 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.