How to Make Android Apps

How to Make Android AppsIn this video I start my new Android tutorial. The last Android tutorial I made is still very popular, but I’m going to try and improve on it here.

If you are a beginner to Android and don’t know Java you may prefer my Android tutorial for beginners. I’ll be using Android Studio in this tutorial and I show how to install Android Studio here. All of the code follows the tutorial below.

If you like videos like this, it helps my search ranking if you share it on Google Plus with a click here [googleplusone]

Code from the Video


import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends ActionBarActivity {

    // onCreate is executed when the activity is created
    protected void onCreate(Bundle savedInstanceState) {
        // Sets the file activity_main.xml as the user interface

        // To be able to edit the TextView with our code we have to create it and 
        // bind it to a TextView object. I need to use final because it will be 
        // used in the inner class below
        final TextView firstTextView = (TextView) findViewById(;

        // I set up the Button just like I did the TextView
        Button firstButton = (Button) findViewById(;

        // This is how you make the Button change the text in the TextView when it is clicked
        firstButton.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {

                firstTextView.setText("You Clicked");


    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(, menu);
        return true;

    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();
        if (id == {
            return true;
        return super.onOptionsItemSelected(item);


<RelativeLayout xmlns:android=""

        android:id="@+id/textView" />

        android:layout_marginTop="52dp" />



    <!-- Default screen margins, per the Android Design guidelines. -->
    <dimen name="activity_horizontal_margin">16dp</dimen>
    <dimen name="activity_vertical_margin">16dp</dimen>


<?xml version="1.0" encoding="utf-8"?>
    <!-- We store all the text in the strings.xml file so it is easy to
    translate into other languages -->

    <string name="app_name">HelloAgain</string>
    <string name="hello_world">Hello Again</string>
    <string name="action_settings">Settings</string>
    <string name="button_1_text">You Clicked</string>



<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
    package="" >

        android:theme="@style/AppTheme" >
            android:label="@string/app_name" >
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />


28 Responses to “How to Make Android Apps”

  1. Roni says:

    when will your Android challenge start??
    I can’t wait to win Samsung Galaxy Note 3 😀

  2. unknown says:

    great job on doing this tutorials keep it up 😀

  3. stephen says:

    can you help me with this error please and thanks
    Waiting for device.
    “/Applications/Android” -avd MonoForAndroid_API_8 -netspeed full -netdelay none

    emulator: ERROR: This AVD’s configuration is missing a kernel file!!

  4. israel says:

    Best tutorials given by the best teacher Dereck Banas

  5. Altiano says:

    i’m going to learn about android apps development, which one should i choose, the new android tutorial or the old one?

  6. Ext says:

    This is my first time programming anything for android, but I have developed a lot for Java and different languages earlier. I followed your tutorial but I can not get it too work. First it does not like ActionBarActivity so I googled and added dependencies {
    compile ‘’
    too build.gradle but now it is complaing about Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version L declared in library

    What am I doing wrong, is it supposed to be this hard? 😀
    I have never actually experienced anything thid hard to do a simple hello world program 😀

  7. David says:

    Derek, are you going to make a video on how to create a menu bar, for example, and add an icon to it? Is this too graphics intensice i.e. GL stuff or is it easier than it looks? Also would you be able to add an action behind that button?

  8. Kevin Kesler says:

    I think i need to learn the path to programming effectively for android. the app inventor has worked awesome and i have overcome all of the obstacles i set out to. what steps would you recommend?
    i have experience with computers mostly by necessity. i did basic in high school. a but of c in college but20 years ago. where should i start now and what should i not bypass? is java what i need to learn?
    a little insight could keep me from wasting vast amounts of time learning things that later will be irrelavant. thanks for your thought 🙂

  9. Will says:

    Thanks for your Tutorial.
    It`s great.

  10. sypi says:

    Thanks for the tutorials! Love the android ones!

  11. dre says:

    way kool video. only downside is that it takes for ever to update the sdk manager.

  12. Derick says:

    Hi there, I ran the code u given and i got an error.

    error:cannot find symbol variable main

    execution failed for task ‘:app.compileDebugJava
    compilation failed; see the computer compiler error output for details

    public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(, menu);
    return true;

    the ‘main’ in error is from the code above.

    may i know how do i resolve this? thank you.

  13. Ashwin says:

    Really a huge fan of yours…! 🙂

Leave a Reply

Your email address will not be published.