Setting Up The Development Environment

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

Mobile App Development

Setting up the Development Environment

Hajrah Jahan
Overview

• Java Programming Recap


• Downloading Prerequisites
• Setting up Android Studio
Java Programming Basics

JAVA CLASS:
• Every line of code that runs in Java must be inside a class.
• The name of the java file must match the class name.
• A class should always start with an uppercase first letter.
• Java is case-sensitive: "MyMalaysia" and “mymalaysia" has different meaning.

MAIN METHOD:
• The main() method is required and you will see it in every Java program.

PRINTING STATEMENTS:
• System.out.print()

Bonus

• Java programming recap course - https://java-programming.mooc.fi/part-8/1-recap


Java Programming Basics

Declaring (Creating) Variables:

type variableName = value;

The general rules for naming variables are:

• Names can contain letters, digits, underscores, and dollar signs

• Names must begin with a letter

• Names should start with a lowercase letter and it cannot contain whitespace

• Names can also begin with $ and _ (but we will not use it in this tutorial)

• Names are case sensitive ("myVar" and "myvar" are different variables)

• Reserved words (like Java keywords, such as int or boolean) cannot be used as names
Downloading Prerequisites

● 64-bit version of Windows (8, 10, or 11), Linux, macOS (10.14 Mojave or later), or ChromeOS.
● x86_64 CPU architecture; 2nd generation Intel Core or newer, or AMD CPU with support for a Windows
Hypervisor
● 8 GB RAM or more
● 8 GB of available disk space minimum
● 1280 x 800 minimum screen resolution
● IDE + Android SDK + Android Emulator

Download Android Studio - https://developer.android.com/studio


Installation

Installation guide

https://developer.android.com/codelabs/basic-android-kotlin-compose-install-android-studio#0
Troubleshooting
guide

https://developer.android.com/codelabs/basic-android-kotlin-compose-install-android-studio#0
Android App Project Structure

Manifest
● Android version, metadata, package details, and
other application components.
● It acts as an intermediary between android OS
and our application.
Android App Project Structure

Java
● Contains all the java source code (.java) files that we create during our app development.
Android App Project Structure

Res
● Contains sources like images, XML layouts, and UI strings for
our android application.
Android App Project Structure

Res/drawable
Res/mipmap
● Contains different density types of icons depending upon the
size of the device such as hdpi, mdpi, xhdpi.

Res/values
● Contains a number of XML files like strings, dimensions,
colors, and style definitions.
Android App Project Structure

Res/values
● Gradle means automated build system.
● Contains a number of files that are used to define a build configuration that can be applied to all
modules in our application.
Handouts
• https://liverungrow.medium.com/recap-on-java-basics-for-coding-interview-df3de58c97fb
• https://web.stanford.edu/class/archive/cs/cs108/cs108.1092/JavaBasicRefresher.pdf
• https://fileadmin.cs.lth.se/cs/education/EDA040/common/java21.pdf
• https://hackr.io/blog/what-is-java

You might also like