Android Studio 和 Eclipse 开发调试的区别

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21347361/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 21:29:37  来源:igfitidea点击:

Difference between Android Studio and Eclipse for development and debugging

androideclipseandroid-studio

提问by Devrath

What are the pro's and con's of using android studio instead of eclipse ?

使用 android studio 代替 eclipse 的优缺点是什么?



Note:: I have looked into the answers hereanswered by CommonsWare but it was not much clear in debugging tools

注意:: 我已经查看了 CommonsWare在此处回答的答案,但在调试工具中不太清楚



  1. Does Android Studio offers special debugging features which are not in eclipse ?

  2. If so what are those ?

  1. Android Studio 是否提供 eclipse 中没有的特殊调试功能?

  2. 如果是,那些是什么?

回答by Thomas Kaliakos

I have used extensively both IDE's. IMHO Android Studio is much better than Eclipse.
Some obvious advantages are:

我已经广泛使用了这两个 IDE。恕我直言,Android Studio 比 Eclipse 好得多。
一些明显的优点是:

  1. It supports gradle (this allows you to really have control over the build, create different application flavors, different signing configurations and so on).
  2. In the layout view you have the option to view both the actual layout and the xml at the same time, while in Eclipse you must choose between the two tabs.
  3. It feels better. From doing a refactoring (like renaming a method, to extracting a class) to viewing the Logcat. The refactorings seem more solid and the Logcat does not "disappear" as it happens in Eclipse (although it must be noted that the filtering does not work that well).
  4. Its the future. Sooner or later this is going to be the standard, as Google is actively developing it.
  1. 它支持 gradle(这使您可以真正控制构建、创建不同的应用程序风格、不同的签名配置等)。
  2. 在布局视图中,您可以选择同时查看实际布局和 xml,而在 Eclipse 中,您必须在两个选项卡之间进行选择。
  3. 感觉好多了。从进行重构(如重命名方法、提取类)到查看 Logcat。重构看起来更可靠,而且 Logcat 不会像在 Eclipse 中那样“消失”(尽管必须注意过滤效果不佳)。
  4. 它的未来。迟早这将成为标准,因为谷歌正在积极开发它。

On the downside I can notice three things:

不利的一面是,我可以注意到三件事:

  1. Still it is not that stable. For example if you want to view your project modules in the module view (as of v0.4.2 for Windows) I cannot see all of them. This actually means that in certain cases the only thing you can do is to build from command line and edit the gradle script.
  2. Because is something relative new, many libraries are not supporting it out of the box, whereas in Eclipse, since it has been around for so long, everything is more or less trivial.
    One example of this, is Robolectric(the library that allows you to run android unit tests on your pc - i.e. over any jvm). I have really struggled to set up Robolectric in a gradle project, and I never managed to do it. In Eclipse it was quite easy.
  3. The last thing is also related to the other ones: Since Android Studio is quite new, you may not find answers online for the problems that you face.
  1. 仍然不是那么稳定。例如,如果您想在模块视图中查看您的项目模块(从 v0.4.2 for Windows 开始),我无法看到所有这些模块。这实际上意味着在某些情况下,您唯一能做的就是从命令行构建并编辑 gradle 脚本。
  2. 因为它是相对较新的东西,许多库都没有开箱即用地支持它,而在 Eclipse 中,由于它已经存在了很长时间,所以一切都或多或少是微不足道的。
    这方面的一个例子是Robolectric(该库允许您在您的 PC 上运行 android 单元测试 - 即通过任何 jvm)。我真的很难在一个 gradle 项目中设置 Robolectric,但我从来没有成功过。在 Eclipse 中,这很容易。
  3. 最后一件事也与其他的有关:由于 Android Studio 比较新,您可能无法在网上找到您面临的问题的答案。

To sum up, sorry I went a bit beyond the debugging tools (although both of them use the same ddms, so there is no difference there, but I noticed Logcat has a difference, as mentioned above). There is no actual dilemma which one is better. Android Studio is, period. The point is when are you going to switch to it.

总而言之,对不起,我超出了调试工具的范围(虽然它们都使用相同的 ddms,所以那里没有区别,但我注意到 Logcat 有区别,如上所述)。没有实际的困境,哪个更好。Android Studio 是,时期。关键是你什么时候切换到它。

Just my two pennies.

只有我的两便士。

回答by Divers

Android studio is much clever. It understands context in which you are working (because it's built over IDEA). And for now it is stable enough to work with. I changed IDE from eclipse to IDEA and then to ADS, six month ago and very happy about this.

Android Studio 非常聪明。它了解您工作的上下文(因为它是基于 IDEA 构建的)。现在它足够稳定,可以使用。六个月前,我将 IDE 从 eclipse 更改为 IDEA,然后更改为 ADS,对此我感到非常高兴。

  1. No, both of them give you full functionality of debugging process.
  1. 不,它们都为您提供了调试过程的全部功能。