Know About Google New Android Studio IDE for App Development!

Know-About-Google-New-Android-Studio-IDE-for-App-Development

What is Google New Android Studio IDE ?

A year has been passed, since the first public release of Android Studio (AS) has been announced. This Google New Android Studio IDE for App development is based on the IntelliJ platform from JetBrains. As the name suggests, for Java programmers it’s the most intelligent Integrated Development Environment (IDE) and is being offered by Google for free.

In contrary to this, Eclipse behaves more maturely and transforming the popular IDE into a fully featured Android developing environment has become very stable with Google’s ADT plugin.

Java developers who want to start with Android development, Eclipse feels like home.
As both solutions look promising, so to see the one’s edge over the other, here we will discuss & compare the both to reveal the main differences.

Android Studio with Top of Its Capabilities Offers :

  • Gradle-based flexible build system

  • Drag and drop theme editing with rich layout editor support

  • Catches performance, usability, version compatibility, and other problems with ‘lint’ tools

  • Build variants and generates multiple ‘apk’ files

  • Build dependencies based on Maven.

  • Help to build common app features with Code templates

  • Google Cloud Platform support for easily integrate Google Cloud Messaging and App Engine

  • App-signing and ProGuard Capabilities and

  • Completion and Refactoring of Advanced Android code.

It is OK to use ‘Eclipse’ when you are developing smaller applications, but for big application e.g. having 10 projects and 10 external libraries, it never works properly and user may experience a lot of problems even with the newest version of Eclipse with crashing at least once a day.

Even-though after the installation of Android Studio and starting the IDE, initially its theme looks ugly, but we can change the default theme without hacks and workarounds to a totally amazing dark theme named as ‘Darcula’.

Android Studio will help developers for easy and fast app development by updating with more cool features and tools like :

Tools Build

Android Studio Utilizes the fast growing Gradle build system. Builds on top of the concepts of Apache Ant and Apache Maven . Also introduces a Groovy DSL (Domain-Specific Language) that allows for scripted builds which opens up many automation possibilities like uploading beta .apk to TestFlight for testing.

Eclipse uses a very robust XML based build system ‘Apache Ant’ as its main build system that many Java developers may already be familiar with.

Completion / Refactoring Advanced Code

Both AS and Eclipse IDEs feature the Standard Java code auto completion.

In case of Android Studio, Google has baked in deeper support for specific Android code and refactoring. When refractoring is not possible using Eclipse and ADT, Android Studio can refactor your code in places. IntelliJ’s Java auto completion seems more “intelligent” and predicts better over Eclipse.

Design UI

A completely redesigned UI design tool is the main USP that Google used to market Android Studio during its release. Now it is much clear after working with it that this new tool is better than the old. Android Studio new interface design is much faster and rapidly responds to changes and having more customization options than Eclipse.

There is quite an improvement in Android Studio UI files or layouts, which are dynamically updated in Preview. Whereas in Eclipse, Graphical Layout never works fine.

Organizing Project

In an effort to manage and organize projects, both IDEs work differently. Eclipse users must be familiar with the concept of workspaces, where on selecting the workspace containing projects can be loaded in a tree navigation. User have to restart the whole IDE, while switching to a project in a different workspace.

By introducing the concept of modules, Android Studio treats this situation differently. One module could be your app, a downloaded library can be another and the current integrated Ad SDK could be a third. Each module can declare their own dependencies and have their own Gradle build files. If you are a long term user of Eclipse, then Android Studio may takes some time to get used to, but still seems more natural.

Performance / Stability IDE

As Eclipse is a big purely Java based software, so to run it effectively requires more than decent amount of RAM and good CPU power to back it up. The users who are unable to strictly meet these criteria, reporting very bad experiences. While an apk export or restart it after using for a few hours straight, it is an usual practice for Eclipse to crash. The whole experience feels faster and more robust with Android Studio.

Android Studio with some updates and complete re-installation of the software eventually comes out of beta, and will definitely blow away Eclipse.

Moreover stability of the editor without any need to reboot, the new and improved UI designer with the sexy themes make Android Studio a real eye candy.

Key Differences between Eclipse and Android Studio

  • Importing a Project 

    It is easy & comfortable to import a project to Android Studio IDE as compared to other IDEs or Eclipse.

  • New dialog completion

Android Studio is quite handy in showing icons, translation files, etc. For example, All translations of the selected word can be seen in one place, while developing an application in different languages.

  • Integrating with version control systems

By default, Android Studio has a smart version control plugin to control versioning of files and their updation with branches. It is easier and quicker just to use a plugin instead of typing commands into Terminal.

  • Analysing Deep Code

A detailed explanation of an exception based on the annotation added will be given if user point to a line. User can also access which constants are allowed for which API ?

Know the basics before migrating your Eclipse projects over the Android Studio.

Work Spaces And Sub-Projects

Eclipse users are well familiar with the concept of a “Workspace.” Here, an Android project includes multiple component projects and libraries which are compiled into “.jar” files and included in the final resulting application.

Whereas in Android Studio, projects are replaced with a new concept called “Modules” and “Library Modules.”

Learn Modules

Excluding a few key differences, modules are somewhat similar to an Eclipse project. Modules are a “discrete unit of functionality that can be run, tested, and debugged independently“.

Each Module have it’s own Gradle build file which is generated automatically while creating a new one, otherwise it can be generated while exporting a project from Eclipse. Gradle files contain various important details like supported Android version ranges, dependencies and other meta-data about an Android project.

Some Modules may be “Library Modules“, just like in Eclipse, conceptually the same as “Library projects.”

A new and improved interface design perspective featured by Android Studio view the working interface and its related components.

In Eclipse also, a “perspective” is used for providing views and visible actions, as well as delivering mechanisms for interaction with resources, multi-tasking and information filtering.

User often need to link to JAR files created by 3rd parties, like in Eclipse. Users now require to get used to adding these .jar dependencies to their Gradle build file and they have to keep these .jar files in a “libs” folder at the root of their module (e.g. project) directory.

Select “Add As Library” by Simply “Right-Click” .jar files in “libs” directory and selected JAR files will automatically be added as Gradle dependencies in the relevant build.gradle file for a Module. Ensure the project has been properly notified of the new dependency on these modules by clicking “Sync Gradle”.

Module Dependencies

One Module depend on another Module, like in Eclipse. To automatically generate the necessary Gradle entries with Android Studio, follow these instructions to establish a dependency between two modules.

App Manifest

Android Studio features one major change that several common items and settings which once lived in the App Manifest now are either added automatically (as in the case of the “debuggable=true” flag indicating an Android application may be debugged) or have been moved to build.gradle such as version codes and API min / max specifications. However, permission requirements and feature must still be declared in the Manifest as before (e.g. “permission: camera” and so on).

Android Expert Help

A useful feature here is to enlist the help of a seasoned Android Studio expert to help a user with the nuances of the new IDE. Get paired with an expert by putting a request on AirPair to cover maximum ground in a short period of time by talking to a real person.

Basics of Gradle

The largest hurdle during your transition over to Android Studio is the addition of Gradle. Here are the basics :

  • During the whole project, an Android Studio project will have a settings.gradle.

  • The settings.gradle file includes references to all modules included in the project and automatically updated while importing or creating a new module.

  • Every Android Studio module have its own build.gradle file.

  • If one module depends upon another module, user need to add that dependency in the build.gradle under the dependencies section

  • A Module requring a jar file, must be listed in that Module’s build.gradle file

  • Add remote dependencies to a project by listing them in a module’s build.gradle file

  • Manually edit these gradle files, from time to time.
Testing Unit

A complete Android Studio comes with a support for JUnit unit and Android tests. To set up and run unit tests, create a few test classes and add them to project’s run configuration. For more specifics, follow the linked guide.

Maven for Remote Dependencies Import

Android Studio helps to import remote library files from Maven Central . Browse, search and select remote libraries from Maven Central and follow these instructions to ensure their dependencies are downloaded automatically at compile time.

Android Build System

It is the toolkit used to build, test, run and package an App. The Ant system with Eclipse ADT is replaced by Android Build System. As an integrated tool, it can run from the Android Studio menu and independently from the command line. The features of the build system can be used to:

  • Configure, customize, and extend the build process.

  • Use the same project and modules to create multiple APKs for an app with different features.

  • Across source sets, reuse resources and code.

The Android build system flexibility enables to achieve all of this without modifying an app’s core source files. You can see Building and Running from Android Studio to learn how to build an Android Studio project? Also see Configuring Gradle Builds, to configure custom build settings in an Android Studio project.

Performance and Debug

A number of improvements to assist in debugging and improving the performance of a code are provided by Android Studio, including inline debugging, an improved virtual device management, and performance analysis tools.

Android Virtual Device (AVD) Manager

Select the most popular device configurations, screen resolutions and sizes for an app previews with updated screens links from AVD Manager.

Open it in the toolbar and create new virtual devices for running an app in the emulator.

Based on specific emulator properties, the AVD Manager creates custom Android device skins and also comes with emulators for Nexus 6 and Nexus 9 devices and assigning those skins to hardware profiles. Android Studio creates a default emulator for quick app prototyping by installing the Intel® x86 Hardware Accelerated Execution Manager (HAXM) emulator accelerator.

You can see Managing AVDs, for more information.

Debugging Inline

It can be used to enhance your code walk-through in the debugger view with inline verification of references, variable values and expressions. Inline debugging includes:

  • Values of inline variable

  • Reference a selected object with referring objects

  • Values of method return

  • Expressions of operator and lambda

  • Values of tool tip

In the Debug window, enable inline debugging by clicking the Settings icon and Show Values In Editor check box.

Edit Intelligent code

Android Studio at the core is an intelligent code editor which allows advanced code completion, code analysis and refactoring.

Android app developer can be more productive with the help of this powerful code editor.

System Requirements :

Windows

  • Microsoft® Windows® 8/7/Vista/2003 (32 or 64-bit)

  • 2 GB RAM minimum, 4 GB RAM recommended

  • 400 MB hard disk space

  • At least 1 GB for Android SDK, emulator system images, and caches

  • 1280 x 800 minimum screen resolution

  • Java Development Kit (JDK) 7

  • Optional for accelerated emulator: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality

Mac OS X

  • Mac® OS X® 10.8.5 or higher, up to 10.9 (Mavericks)

  • 2 GB RAM minimum, 4 GB RAM recommended

  • 400 MB hard disk space

  • At least 1 GB for Android SDK, emulator system images, and caches

  • 1280 x 800 minimum screen resolution

  • Java Runtime Environment (JRE) 6

  • Java Development Kit (JDK) 7

  • Optional for accelerated emulator: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality

On Mac OS, run Android Studio with Java Runtime Environment (JRE) 6 for optimized font rendering. You can then configure your project to use Java Development Kit (JDK) 6 or JDK 7.

Linux

  • GNOME or KDE desktop

  • GNU C Library (glibc) 2.15 or later

  • 2 GB RAM minimum, 4 GB RAM recommended

  • 400 MB hard disk space

  • At least 1 GB for Android SDK, emulator system images, and caches

  • 1280 x 800 minimum screen resolution

  • Oracle® Java Development Kit (JDK) 7

Tested on Ubuntu® 14.04, Trusty Tahr (64-bit distribution capable of running 32-bit applications).

Android SDK Installation

Select the required SDK bundle to install here, download the Android SDK bundle for Android Studio or the stand-alone SDK Tools.

Android Studio Installation

If you want to start developing apps for Android with Android Studio including the Android Studio IDE and the Android SDK tools, then go download Android Studio now, or switch to the stand-alone SDK Tools install instructions.

Be sure you have installed JDK 6 or higher, before you set up Android Studio. When developing for Android 5.0 and higher, JDK 7 is required. Open a terminal and type ‘javac -version’, to check if you have JDK installed and its version. Download JDK If the JDK version is lower than 6 JDK or is not available.

App Development 

To develop an applications (with or without Android Studio), it requires the basic steps as shown in figure.

There are four development phases, which include:

  • To Set-up Environment

Install and set up a development environment. Create Android Virtual Devices (AVDs) and connect hardware devices to install your apps.For more information, see Managing Virtual Devices and Using Hardware Devices.

  • To Set-up and Develop a Project

Set-up and develop an Android Studio project and application modules containing all of the source code and resource files for an application. For more information, see Create an Android project.

  • Build, Debug and Test

Install a debuggable .apk package(s) to build a project and run it on the emulator or an Android-powered device. A build system based on Gradle used by Android Studio provides flexibility, dependency resolution, customized build variants, and many more. Users can build a project using Gradle and install it on a device using adb, if they are using another IDE.

For more information, you can see Build and run your application.

Debug an app with Android Studio using the Android Device Monitor and device log messages (logcat) along with the IntelliJ IDEA intelligent coding features.

Finally, test an app using various Android SDK testing tools.

For more information, see Test your application with the Testing and Instrumentation framework.

  • Publishing

Build and configure an app for release and distribute it to users.

For more information, see Publishing Overview.

In spite of having advantages of a lots of above discussed features, some disadvantages of Android Studio  are also there, as summarised below :
  • Many libraries are not supporting it out of the box, with this relative new software, whereas in Eclipse, everything is more or less trivial, since it has been around for so long.
  • Also you may not find online solutions for the problems you face.
  • There are less resources to learn than for eclipse IDE.

As a developer, if you had a bit of experience in android and knows its basic, then it will be better to use Android Studio since its the future. But if you are absolute newbie in Android Development and knows nothing in Android then start with Eclipse, as your queries will be getting answered more quickly with lots of resources available online.

Android Studio is under rapid development by ‘Google’ and seems to be getting better every week, check out for it.

If you have any query or want to consult with us how to use Google New Android Studio IDE for App Development or how to migrate a large and gnarly project from Eclipse over to Android Studio,  then feel free to Reach us.

Our team of Android experts at TBI will guide & serve you with the better suitability of your Project.

If you have found above resource useful, then please do share your comment with us below :

Ellipsis-1s-200px