Step 1: Set Up Android Studios
Part 1: Installing JDK on Your Computer
First you need to install Java so that you can actually program your app.
Go to https://www.oracle.com/java/technologies/downloads/
2. Select the version of Java and choose if you are using Linux, Mac Os, or Windows
3. Click on one of the Java download files
4. Once it is finished installing, click on the arrow on the left side of the pop up at the bottom of the screen and select show in folder.
5. Once you are in the files, double click on the newly downloaded installer.
6. In the following pop up screens, select next > next > close.
Part 2: Change Enviromental Variables
Go to settings for your computer, type in environment and select Edit the System Environmental Variables.
2. At the bottom of the pop up, select Environmental Variables.
3. Find the path to your Java bin and copy it. The path to this file should look something like this: C:\Program Files\Eclipse Adoptium\jdk-11.0.20.8-hotspot\bin. (Eclipse Adoptium might not be in the path to your instillation on your computer)
4. Back in Environmental Variables, in the User Variables section select the OneDrive Variable and in the System Variables section select path. Hit Edit at the bottom and then in the new page that pops up select New. Paste the path to your java bin in the blue highlighted area that appears and hit Ok.
5. Right underneath the User Variables section click on the New... Make Java_home the name and paste the path to just the Java Jdk. (Just remove the bin part at the end of the path you originally copied. Hit OK
Part 3: Install Android Studio
Go to https://developer.android.com/studio and click on download in the middle of the screen. Agree to the terms and conditions and then select Download in the pop up.
2. In the bottom left of screen click on the arrow in the pop up that appears once it finished downloading. Select Show in Folder. Double click on the installed application.
3. In the pop ups that appear, select Next > Next > Next > Install > Next > Finish.
4. In the Import Android Studio Setting pop up that appears, select Do not import settings and hit OK.
Step 3: Setting Up Your First Project
Open Android Studio if it is not already opened
2. In the Welcome to Android Studio dialog, select Start a new Android Studio project
3. Select Basic Views Activity
4. Name your project MyFirstApp and ensure the Language is set to Java, NOT Kotlin. Select Finish.
Step 4: Explore the Layout
Project View:
Shows all the files in the Project.
Click on the folder image in the top left corner to open and close this view.
Click on the files that you want to open to open them:
AndroidManifest.xml: This file describes all the components of your Android app and is read by the Android runtime system when your app is executed.
java: All your Java language files are organized here. The java folder contains three subfolders:
com.example.myfirstapp: This folder contains the Java source code files for your app.
com.example.myfirstapp (androidTest): This folder is where you would put your instrumented tests, which are tests that run on an Android device. It starts out with a skeleton test file.
com.example.myfirstapp (test): This folder is where you would put your unit tests. Unit tests don't need an Android device to run. It starts out with a skeleton unit test file. 3. Expand the res folder. This folder contains all the resources for your app, including images, layout files, strings, icons, and styling. It includes these subfolders:
drawable: All your app's images will be stored in this folder.
layout: This folder contains the UI layout files for your activities. Currently, your app has one activity that has a layout file called activity_main.xml. It also contains content_main.xml, fragment_first.xml, and fragment_second.xml.
menu: This folder contains XML files describing any menus in your app.
mipmap: This folder contains the launcher icons for your app.
navigation: This folder contains the navigation graph, which tells Android Studio how to navigate between different parts of your application.
values: This folder contains resources, such as strings and colors, used in your app.
Virtual Device (Emulator):
Android Studio allows you to create a virtual device that you can run your app on.
This virtual device will automatically be called whenever you run your app.
The panels on the right of the screen allows you to manage this device.
The triangle in the top middle of the screen allows you to run your app on this device.
Display Editor:
Open one of the XML files (Project > app > res > layout)
In the top right of the file there is 3 options that allow you to view this xml files in different ways
Select the far right option labeled Design
This will bring up a screen with different panels
The top far left side of the screen opens the Pallete:
This brings up options that you can add to the app
The bottom left is the Component Tree:
This brings up the view that are currently in the file
The right side of the screen is Attributes:
This allows you to edit the attributes of the things you add to you app