How to develop first android Application/App in Android Studio ?

If you are the beginner for learning how to write Android application using Android Studio, you are at the right place. But before we proceed further, make sure you have installed Android Studio by following “How to install Android Studio for 64 bit Ubuntu machines”

Once you have Android Studio Installed, start the Android studio from command line as,

$ cd android-studio/bin
$ ./studio.sh 

This will Start Android Studio and you will see a screen like as below,

Android Studio

From this, to create a new Android Application as a project, click on “Start a new Android Studio Project” which will open another window as below,

Android Studio

Above window will give you ready templates for different types of Activities which will automatically generate source code for us corresponding to type of activity we choose. Since this is our first application, we will choose the “Empty Activity” and click “Next”

Android Studio

On the above screen, you can the Any name you want for the application and also the package name you want to use for the App, and also can select either JAVA or Kotlin as your default programming language. Since this is our very first application, we will try to create the App in JAVA but you may also select Kotlin if you are versed with Kotlin programming language. Finally click “Finish”

Related :   Enabling adb support with Linux kernel for new platform / Compiling Linux kernel to add adb support

Once you click “Finish” , Android Studio Editor will open and allow you to edit the source code. You will see an window like as below,

Android Studio

From the opened window, to compile the Application, go to “Build” -> “Build Bundle(s) / APK(s)” -> “Build APK(s)” which will generate the APK as,

$ tree app/build/outputs/apk/
app/build/outputs/apk/
├── debug
│ ├── app-debug.apk
│ └── output.json
└── release
    ├── app-release-unsigned.apk
    └── output.json

2 directories, 4 files

Now, you can install the debug APK on your devices as,

$ adb install app/build/outputs/apk/debug/app-debug.apk

the another type of APK is release APK, but since release APK’s needs to be signed before we can install on device, we will not be able to install app-release-unsigned.apk as is on our device and we will see how to sign a release APK in another Post.


lynxbee_ezoic

Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )

   


2 thoughts on “How to develop first android Application/App in Android Studio ?”

Leave a Comment

Android Android Build system Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded