Android Studio – Knowing your IDE
On top of IntelliJ’s powerful code editor and developer tools, Android Studio offers even more features that enhance your productivity when building Android apps. You will be amazed to see a lot of things in one place, and at the same time feel how easy it is to start off as a beginner as well.
Android Studio is Open Source, you aren’t going to pay for anything, and can get started from the get-go. All the tutorials in this website are designed and developed using Android Studio only. The community support for Android Studio is also extremely huge.
Some of the features as explained in the Android Studio Docs include,
- A flexible Gradle-based build system
- A fast and feature-rich emulator
- A unified environment where you can develop for all Android devices
- Instant Run to push changes to your running app without building a new APK
- Code templates and GitHub integration to help you build common app features and import sample code
- Extensive testing tools and frameworks
- Lint tools to catch the performance, usability, version compatibility, and other problems
- C++ and NDK support
- Built-in support for Google Cloud Platform, making it easy to integrate Google Cloud Messaging and App Engine
You can see tutorials for all of this in various blog posts in this space.
Getting Started with your first Application
Time to explore the IDE, go ahead, hit this location and download your copy of the Android Studio IDE. IDE takes care of auto-installing all the mandatory dependencies, including SDK, ADB, and other important dependencies. There are other dependencies which may be required at various points in the application development cycle, and we can install them at that point.
For now, you can complete the installation procedure and Jump back in here.
Upon completion of the Android Studio Installation, you are taken to this page, where you will be creating your Android Project. I am using Android Studio on MAC, but it must be similar in all other OS’s as well.
As you see there are several Fields which you need to fill. This is most certainly confusing if you are a beginner. We will see what each of these fields mean below.
- Application Name – This specifies your application name, the one name which will be present when the app is installed, referred in the Android Play Store. You have to make sure the name of the Application is unique so that it attracts the user, this is the first level of letting the user know about your app
- Company Domain – This is where your application packages are going to be named with a prefix. This Company name will be used to bundle your application into a package. It is very important to make sure your application contains a unique company name, as this is the identifier the Google Play Store uses to locate your application, even if there are going to be 1000 applications with the same name (2048 for eg), each application is unique from the other because of a different company/package name associated with it.
I would recommend adding your company/your name in the reverse naming format followed by your app name to give it a unique name.
- Project Location – Specifies where your project files will be stored, by default it creates a folder with your application name in the user location
- Package name – This is auto-generated using your Company Domain and your Application name. Like we saw above, it has to be unique.
Include c++ support, needn’t be chosen, because we will not have anything to do with c++ in any of the mainstream applications.
Upon completion Click Next.
Setting Your Target Devices
If you have seen the list in the drop down and got your jaw down! don’t worry too much, these are the list of API’s that Android still supports, thankfully 15 and up is a good number and also the support can be better.
You choose, which device you want to target, from Phone Tablet to Wear and TV, there are a lot of things you can choose from (Be aware of the changes in the screen size as it can affect the application feel).
Upon Completion Click Next
Choosing a Activity
This page seems pretty obvious, every application has to contain a landing Activity. You can know more about Activities here. Choose one from the list of Activities available and let the IDE take care of creating you a Skeleton.
The Different type of Auto-Generated Activities available are.
Basic Activity – A simple white layout with a Floating Button in the bottom right corner.
Bottom Navigation Activity – Creates a simple Bottom Navigation type Activity with Fragments code auto generated
Empty Activity – Just what you need, no additional fills, creates a simple blank activity.
FullScreen Activity – Creates an Activity with no AppBarLayout present.
Google AdMob Ads Activity – If you know about AdMob Ads, you will know what this activity will be used for. This creates a proper Activity to position your Ads appropriately.
Login Activity – Newly added option, that creates a Login Activity with basic UserName and Password fields.
Choose any Activity and Click Next
Enter the Activity and Layout Name
Enter your activity and layout name to start creating the Skeleton for your project.
Creating Your Application
Creating You App and Running it
Once done, it is time to create a simple application and run it.
Do drop in any comments below if any regarding Setting Up Android Studio Project from scratch.
“Learn and be curious”