使用Android Studio开发的四点理由

有朋友跟我聊天中抱怨Android Studio很难用,还是Eclipse好用,我也相信还存在很大一部分Android开发者还在继续使用Eclipse开发Android。从Android Studio内测版开始我就开始使用了,越用越顺畅,导致我在开发中越来越依赖它,现在如果让我换回Eclipse开发,一定苦不堪言。为什么开发Android我会坚定不移的使用Android Studio?下面是我使用Android Studio作为主IDE的几个理由:

1.Android官方建议

Android官方去年六月底在博客上就建议开发者从Eclipse迁移到Android Studio。Android的产品经理说:

Over the past few years, our team has focused on improving the development experience for building Android apps withAndroid Studio. Since the launch of Android Studio, we have been impressed with the excitement and positive feedback. As the official Android IDE, Android Studio gives you access to a powerful and comprehensive suite of tools to evolve your app across Android platforms, whether it’s on the phone, wrist, car or TV.

这哥们大致上是说:“我们过去一直致力于用Android Studio提高Android App的开发体验。自从推出Android Studio后,一直备受好评。这是官方推出的Android IDE,提供了众多牛逼哄哄的功能,你敢不用我削你。”

2.代码智能提示

android-studio-hero-code

对于Eclipse来说,当需要提示的时候,每次都得手动敲一下【Alt+/】才能弹出提示。而Android Studio是「智能」的,你输入第一个字母后,它就会主动将一系列相关的类或方法或变量都弹出来供你选择。可以说这点至少提高了我20%开发效率。

3.同时预览不同屏幕尺寸的效果

android-studio-hero-screens

在Android Studio上,你可以很轻松的预览不同尺寸屏幕上所显示的效果,这可以大大减轻Android开发的适配工作。

4.使用Gradle自动化构建工具

自动化构建工具是每个开发者都需要了解的。Java开发者可能对Maven很熟悉,Gradle之于Android,正如Maven之于Java。Gradle不但吸收了Maven的优点,还大大简化了构建配置,支持多种方式依赖管理,因此Gradle比Maven略胜一筹,青出于蓝。比如:下面简单的两行就用了两种不同的方式添加依赖。

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])    //将本地项目libs目录下的所有jar包自动添加依赖
    compile 'com.android.support:appcompat-v7:21.0.0'    //自动从maven远程仓库下载并添加依赖
}
THE END

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注