This is a sample application that demonstrates how to build an Android application. This application has a single screen that allows you to sign up for an account, log in, and view a list of users.
It is not required of you to use this application as a starting point for your project. You may choose to start from scratch, or use another sample application as a starting point. This application is provided as a reference for you to use if you find it helpful.
To create an Android project in IntelliJ IDEA (Ultimate), follow the instructions in the Create your first Android application tutorial.
This project uses the following dependencies:
Note: Other dependencies may be added to the project as needed.
This project requires the following software:
While IntelliJ IDEA Community is sufficient for this project, we recommend using IntelliJ IDEA Ultimate. IntelliJ IDEA Ultimate has additional features that may be useful for your project, especially the ability to add SQLite support.
To get started, clone this repository and open the project in IntelliJ IDEA Ultimate. There are a few things you need to do before you can start coding.
First, you need to set the Gradle JVM to use the Amazon Corretto 11.0.8 JDK. To do this in IntelliJ IDEA, goto Settings > Build, Execution, Deployment > Build Tools > Gradle
.
Click Edit
on the Gradle JVM
and you will be prompted to setup the Gradle JVM. Select Version 11, vendor Amazon Corretto
, and click OK
.
Navigate to the Gradle
tab (on the right) and click Reload All Gradle Projects
.
Next, you need to download the Android SDK. To do this in IntelliJ IDEA, goto Settings > Appearance & Behavior > System Settings > Android SDK
.
Click Edit
on the Android SDK Location
and you will be prompted to setup the Android SDK. Select Android SDK
and API 33: Android Tiramisu (R)
. Click Next
to review the SDK components that will be installed, then Next
and agree to the license agreements. Click Next
again to begin the installation. Once the installation is complete, click Finish
.
Then, you will need to create an Android Virtual Device (AVD) via the Android Emulator to run the application. To manage virtual devices, click the No Devices
button in the top right corner of the IDE (next to the Run
button).
Then, select Device manager
and click the Create device
button. Select an appropriate device to emulate, then click Next
. Select an appropriate system image. If no system images are available, click the Download
icon next to Tiramisu
to download the system image. Once the system image is downloaded, click Next
to review the AVD configuration. Click Finish
to create the AVD.
After creating the virtual device, we recommend you to turn off the Android Emulator > Launch in a tool window
option.
Now, when you click the Run
button, the Android Emulator will launch and run the application. For the first time, you may be asked to Install Haxm
to speed up the emulator. Click OK
to begin the installation. You will be asked to allocate a certain amount of memory to Haxm, then click Next
to begin the installation. Once the installation is complete, click Finish
.
Before coding, we also recommend setting Intellij IDEA to use the Android
view rather than Project
view.
Additionally, please read the Android Developer Guides - Fundamentals to get familiar with the Android application file structure, including the following:
In this project, the Java code is located in the app/src/main/java
directory. The XML code is located in the app/src/main/res
directory (specifically, the layout
directory contains the XML code I created for the UI). The AndroidManifest.xml
file is located in the app/src/main
directory.
Tests are located in the app/src/androidTest/java
directory. The AndroidManifest.xml
file for tests is located in the app/src/androidTest
directory.
Please note that this is not an exhaustive list of tutorials. These are just some tutorials that I found helpful. You may find other tutorials more useful to you, depending on your learning style and your project requirements.
Videos:
Articles / Guides: