Programming Android App: Getting Started

So you want to program your own very first Android app. In our Hello World example, we will explain the first steps with Android Studio for you. This creates the basis for ensuring that you can get started with the development of your own first Android app.

  • Best Android Apps 2016
  • Best Android Games

Today bought a smartphone? Why not?

Choose 50 € are still missing. or I agree ..

VS
  • 435 StimmenOoops! Something went wrong. should update helfen.50 € still missing.
  • 365 StimmenOoops! Something went wrong. should update helfen.Ich agree.

The development of Android apps requires knowledge of the Java programming language. But even if you come from C ++, you should find their way to you quickly. In this tutorial I will use Android Studio. The development environment is provided for free by Google and is ideal for programming and testing of your Android app.

Installed the necessary software

So the first thing you need Android Studio. Download it down at the following link:

  • Download Android Studio

The installation wizard guides you through the setup, so you have to just follow his instructions. He may prompt you to to install the Java Development Kit. 7 You can find the latest version for your platform at this link:

  • JDK 7 Download

If the installation wizard of the android studio after JDK_path asks you seek for Windows in the C: \ Windows \ System32. Then you should be able to start Android Studio.

Creates a new project

If you programmed your Android app, this will consist of several individual files. These components referred Android Studio total as a project. Just such so you want to create. Click this button on the top: Start a new Android Studio project.

android studio 1The first step is starting a new project. © AndroidPIT

Now you must click Next and it will open a new window. The first input box you can type a name for your new app set, for example, "HelloAndroidPIT", The second line is not interesting for us. In the third where your project is saved is determined.

In the next window that opens you must define which platforms and versions of your app to be available. In our case, we choose Phone and Tablet, because the app is not intended to be developed for SmartWatch, TV or other devices.

android studio 3Selects which platforms and versions to support your app. © AndroidPIT

Once you have clicked Next, re-opens a new window where you have to choose what you want to kind of app you develop. In our case it is a Blank Activity.

Now you're reached the last step of project creation. Here you have to do is select the Activity name. The rest should be filled in automatically. You can change the individual entries but manually.

android studio 5Selects a name. The remainder fills up all by themselves. © AndroidPIT

Now you have to wait a short while, was created to your project. The program then loads the user interface, which can take quite a bit longer.

text editing

Once the user has loaded, you can select your new project far left of the vertical list. Her then you should find the following screen:

android studio 8In this window you can edit the app. © AndroidPIT

You can find links now the main directory, on the you have access to all content of the project. Next in the middle you see the so-called 'Palette' on you can add, among other text. Among them are two tabs, design and text that activate the code editing. Some of you will they perceive as more pleasant than the processing via graphical user interface. Further to the right you will find a real-time overview of all the changes that your vornehmt to you and your project. If you add a text, you see this menu.

Selects the root directory res > layout > activity_helloandroidpit.xml out. As you can now see Android Studio has already taken over some of the work: Hello World is already displayed on the screen. Since we want Hello AndroidPIT Show, we create the text and change it visually. So click on text Fields in the 'range', as shown below:

android studio 9A click on text Fields deletes the old text. © AndroidPIT

You can now select the text Hello World, which is already represented with a blue border and delete it. Now that the rather unsightly text is gone, you can create new My yours. You have to in the 'range' select the Large text. After that you can place it on display after your taste.

Of course, can be accomplished via the code this. You can furthermore also align the text to display it, for example centered.

But beware: Once you have created the text, a small icon in the upper right appears with a warning sign. This is not an error but an indication that may be a problem. In our case, this can be resolved quickly where your simply clicks on the alert, and then click the first link that appears as shown in the window below:

android studio 11The warnings are no error messages, but notes. © AndroidPIT

A function that does not help us in our case because we only show simple text on the screen: you can watch different smartphone models with different screen sizes to display. By default, the Nexus 4 is displayed. but you can choose your favorites himself.

android studio 13Here you can select the desired model. © AndroidPIT

Now you must connect your phone to the PC. To launch the app on your smartphone, you need only click on the small triangular play icon. Selected in the window that opens on your smartphone, the app will load on your smartphone.

Now you have your first self-made app on your smartphone. Let your ideas and inspiration run free and maybe, is thrilled millions users from a simple Hello AndroidPIT an app.

What's your first app idea? we want to solve the next problem that?