2019. 8. 4. 22:56ㆍAndroid Studio
When you first start the android studio, you will see the screen below.
But if you happened to see the Hello World Project that we did in the last article.
Go to -> File tab -> click "Close Project"
1. Create a new project
- After you closed your current project, you are going to see screen #1
1) Select "Start a new Android Studio Project"
2) Select "Empty Project" and press "Next" (Most of the functions that will be discussing in the future will be made upon an empty project base)
3) Name the Project (Write any project name you want in the red box below)
- Have a project name that can identify the project for your convenience in the future
** Language: Java (IMPORTANT)
** Set Minimum API level: API 21(Optional, but please set it the same with mine, just to have the same environment)
** Save Location: Leaving it default is recommended. It might be hard to find the project if you save your project here and there.
2. Wait until the project finishes its build (※ Android Studio constructs the necessary features for your project, even if you chose an empty project)
1) When the project finishes its build successfully, you will have two files ready for you to use
- MainActivity.java (Java Class File)
- activity_main.xml
Why does Android Studio make MainActivity.java and activity_main.xml for us?
i. The other settings and files are initially connected to MainActivity.java. In this case, we can easily check whether all the settings and android studio build are successfully made by simply running the project once.
ii. Sometimes one application project is built by many other programmers. By having the same default structure of the project will make others easier to understand the project.
- For example, even if you make notifications in the project. I can tell that MainActivity.java is the starting point of the project, connected to the first activity of the application.
3. Run the project
To run the project, press the right arrow-ish green button. or by pressing "Shift + F10"
Surprise! now you have your first project!
Of course, we did not make any changes to what's already given to us. We just have a simple "TextView" saying Hello World!
But, from the next article, we will start adding, deleting, modifying java class files, XML layout files, and codes. So don't worry. Let's start walking forward slowly but constantly.