Type R is already defined error

时间:2022-11-06 16:37:31

今天import a project, 编译时提示Type R is already defined error, google, *,  找到一个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 后修改的地方没有生效,

都要抓狂了~@!@#$@#$,  后来想起那个warning, 果断恢复原来设置, 再google, 发现原来时src 目录下 也有个 R.java 导致的, delete 后clean & rebuild, test ok.