Android Studio:禁用“外部构建"显示错误输出创建重复的类错误 [英] Android Studio: disabling "External build" to display error output create duplicate class errors
问题描述
我开始从 Eclipse 迁移到 Android Studio,并开始在 Studio 上玩新项目.
I am starting my migration from Eclipse to Android Studio, and start playing with new projects on Studio.
我的测试项目运行良好,直到我收到一些错误消息.
My test project was working fine till I got some errors messages.
我必须进行一些操作(https://stackoverflow.com/a/16876993/327402)才能启用要显示的错误输出,并找到了我修复的问题.
I had to do some manipulation (https://stackoverflow.com/a/16876993/327402) to enable the error output to display, and found the issue that I fixed.
不幸的是,在这个解决方法"之后(我为什么要做出这样的事情来查看我的错误?),我发现有一条我无法修复的错误消息:
Unfortunately, after this "workaround" (Why the hell have I to make such things to see my errors?), I found that there was an error message that I cannot fix:
error: duplicate class: com.mypackage.name.BuildConfig
error: duplicate class: com.mypackage.name.R
我还注意到我不是唯一遇到此问题的人(请参阅我上面链接的 SO 答案中的评论)
I also noticed that I am not the only one to have this issue (see the comment in the SO answer I linked above)
第一次,我能够通过再次启用外部构建"来修复它,但又发生了,因为我需要查看错误输出,现在一切都坏了,我找不到发生了什么.
First time, I was able to fix it by enabling "External build" again, but that happened again, because I needed to see the error output and everything is now broken, and I cannot find what happen.
在Eclipse中,R文件很容易找到,在gen文件夹中,但是在Android Studio中,文件太多,我有点迷失了.
With Eclipse, the R file was easy to find, in the gen folder, but with Android Studio, there are too many files, and I am a little bit lost.
有什么想法/建议吗?
推荐答案
所以,只是为了让你知道...
So, just to let you know...
在我发布问题几分钟后,Google 发布了 Android Studio (0.1.5) 更新请参阅链接:https://plus.google.com/+AndroidDevelopers/posts/Y9vhvGaHCbh
A few minutes after I posted my question, Google released an update to Android Studio (0.1.5) See link: https://plus.google.com/+AndroidDevelopers/posts/Y9vhvGaHCbh
Tor Norbye 在这个社区很好地回答了我的问题,我在这里分享
Tor Norbye kindly answered my question in this community, and I am sharing here
所以我在 OP 中引用的解决方法不再是强制性的.
So the workaround I quoted in the OP is no more mandatory.
在升级 Android Sudio 后再次启用外部构建让我看到真正的错误(我修复了一个库和一些 Gradle 导入)
Enabling again External build after upgrading Android Sudio let me see the real errors ( a library and some Gradle import that I fixed)
所以,我认为 Android Studio 升级是这个问题的最佳答案...
So, I consider the Android Studio upgrade as the best answer to this question...
这篇关于Android Studio:禁用“外部构建"显示错误输出创建重复的类错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!