Android:Setting up your development environment

From Juneday education
Jump to: navigation, search

Work in progress

Remove this section when the page is ready...

Introduction

This chapter helps you installing and gettings started with the Android development environment:

  • Install Android Studio
  • Use Android Studio
    • Creating a project
      • App and package name
  • Android Virtual Device
  • Running your app on an AVD
  • Running your app on a connected device (physical)

Android Studio

In this course we're going to use Android Studio. Android Studio is the official IDE (Integrated Development Environmnet) for Android. With Android Studio you will get:

  • integration with the emulator
  • integration with the compiler
  • code templates
  • testing tools and frameworks
  • a design view (for your graphical user interface)
  • and more

Note: You may wonder how we can recommend using an IDE when we have written the page Why not IDE. Using IDEs are not bad, even though we seldom do it ourselves. Given that you should know Java when following this course we don't think that the IDE stands in the way when learning, as an IDE does (in our not so humble opinion) when learning Java. We will try to provide command line versions of things we do with the Android Studio.

Installing

Installing Android Studio is easy. Follow the instructions at: Install Android Studio

Create a new project

To get started with Android development we will get familiar with Android Studio and some tools. After that we will introduce some basic concepts (in Android Basics

Create a new project by pressing File->New->New Project .

In the following window you are to to fill in some information. We provide some suggestions here:

  • Application name: Throwaway
  • Company domain: throwaway.juneday.se . This, as Android Studio shows you, coresponds to a Java package se.juneday.throwaway.
  • Include C++ support: You don't need this
  • Project Location: leave as is

Press Next.

In the following window choose:

  • Phone or tablet
  • Minimum SDK: API 21: Android 5...

Press Next. Android Studio will now create a lot of stuff for you. Be patient. Press Next.

In the following window choose:

  • Empty Activity

Press Next.

In the following window choose:

  • Activity Name: MainActivity (default)
  • General File Layout: checked (default)
  • Layout Name: activity_main (default)
  • Backwards compatibility (AppCompat): checked (default)

Press Finish.

Et voila, you have a project.

Run your app

Follow the instructions in this page: Run Your App

Videos

No videos

Links

External links (further reading)

Books this chapter is a part of

Android - the practical way

Book TOC | previous chapter | next chapter