Welcome Programmers! In this tutorial, we will teach you how you can build your first android app using Android Studio. Java language to develop our app. So let's get started. We hope you have already installed Android Studio on your PC and completed the setup. If you haven't don't worry, just check out this post and then continue reading.
We won't be using much code in this tutorial as this is your first app. Before making the app you must have some basic knowledge of Java. Now, just follow the steps that are given below to build your app.
Build Your First Android App
Step-1 Open Android Studio and Create a new project
- After opening Android Studio, a window will pop up
- Select 'Start a new project'
- Enter 'Hello world' as the name of your app
- Click 'Next'
- Select the minimum API as 16 and set the project location.
- Click 'Next'
- Select the 'Blank Activity' and click 'Finish'
- Your project is created and you are all set to go.
Step-2 Edit the Welcome message in the main activity
- After clicking Finish your project will open and Gradle will start..
- After Gradle will build, MainActivity.java and activity_main.xml will open.
- MainActivity.java will contain the main code and activity_main.xml will contain the UI content. In this XML you can design the application.
- For now, we will work only on the XML part.
- Open the XML part in your android studio project named activity_main.xml.
- You will see a tag named TextView and in it, you will see ' android:text="Hello World" '
- Instead of Hello World, write your own text like 'Welcome to my first app'
- Congrats! you are all set.
Step-3 Run your first App
- In the top toolbar click 'Run' and in the dropdown select run the app.
- Select the Virtual Device or create a new one or run on an actual app.
- Congratulations you have successfully build your first android app.