Build your first app
Lesson 1
Android Developer Fundamentals V2
1
1
1
Android Developer Fundamentals V2
This work is licensed under a Creative Commons Attribution 4.0 International License.
Your first Android app
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
1.1 Your first Android app
2
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Contents
3
Android Developer Fundamentals V2
This work is licensed under a Creative Commons Attribution 4.0 International License.
Create your first Android app
Prerequisites
4
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Android Studio
5
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
What is Android Studio?
6
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Android Studio interface
7
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Installation Overview
8
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Creating your �first Android app
9
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Start Android Studio
10
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Create a project inside Android Studio
11
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Name your app
12
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Pick activity template
13
Choose templates for common activities, such as maps or navigation drawers.
Pick Empty Activity or Basic Activity for simple and custom activities.
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Name your activity
14
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Project folders
15
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Gradle build system
16
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Run your app
17
17
2. Select virtual or physical device
3. OK
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Create a virtual device
18
Use emulators to test app on different versions of Android and form factors.
Tools > Android > AVD Manager or:
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Configure virtual device
19
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Run on a virtual device
20
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Run on a physical device
21
Windows/Linux additional setup:
Windows drivers:
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Get feedback as your app runs
22
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Adding logging to your app
23
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
The Logcat pane
24
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Logging statement
import android.util.Log;
// Use class name as tag
private static final String TAG = � MainActivity.class.getSimpleName();
// Show message in Android Monitor, logcat pane
// Log.<log-level>(TAG, "Message");
Log.d(TAG, “Creating the URI…”);
25
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Learn more
26
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
Learn even more
27
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
What's Next?
28
Android Developer Fundamentals V2
Your first Android app
This work is licensed under a Creative Commons Attribution 4.0 International License.
END
29
Android Developer Fundamentals V2
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License