In this tutorial, we are going to see, how to create a new project using the Android Studio.
Learning Android application development will help you to create your Android application easily. Most people preferring the mobile application instead of the web application. So clients are also showing more interest to develop a mobile application for their services/products.
Create A New Android Project:
Check out the Android Studio installation steps : https://www.eyewey.com/articles
Once the installation is completed, you can see a screen like below or if you open the Android Studio from the Launchpad, then you will see a screen like below.
Click the Create New Project to create a new Android project.
Next, Choose the Empty Activity from the project template screen.
Then give the project name and click the Finish button to create a project.
Say for example, if I am working for a company named Nexart and my application name is eyewey, the package name will be created like below
com.nexart.eyewey
Using the reverse domain name in the package name will give us a unique name with the project name.
That’s all. We created a new Android project using Kotlin on macOS.
Project Structure:
Now we created a project in the Android Studio. Let’s look at some folder structures in the project.
3. Pages => As a beginner, we always try to know where the pages will be created. The pages are created in the layout folder. All pages are XML files. All pages are created using XML syntax. All components such as button, text field, card, list , etc., will be created using the XML. The default landing page is the activity_main.xml file.
The full path of the pages folder is given below.
app/src/main/res/layout/
All the pages are associated with a Kotlin file. The activity_main.xml file is linked with the MainActivity.kt file. The page in Android application development will be called Activity. So, for every activity, we have a Kotlin file. The Kotlin file is used for action events such as click event, change event, navigation, etc.
4. Images => All the resource files such as Images, Audios, Videos, files, etc., will be placed under the res/drawable folder.
5. App Icons => The app icons are placed under the res/mipmap folder. You need to create a different dimension of the app icon for different devices.
6. AndroidManifest XML=> It is a summary file. It contains all the component details such as Activity(page), Services(reusable functions), etc. If you are going to access the device’s hardware property such as GPS, Camera, etc., then you must declare permission to use those things in this file. It is located in the app/src/main/ folder.
7. Build Grade => It contains all the configuration and plugins information. External libraries or other needed libraries are included in this file. It is located under the app/ folder.
Conclusion:
In this tutorial, you learned how to create a new project using the Android Studio. And we have seen the project structure of the Android project and the use of important folders and files.
I hope this article will be helpful to start your journey in Android application development.
Thank you for reading.
Credits : https://medium.com/codex
Keywords: How to create a new project in Android Studio, Create new project, Project Structure, Android Studio, Kotlin, App Development