Category Archives: Android Tutorial

Some Common Android Development Errors and Solutions

Some Common Android Development Errors and Solutions

You might face some issues/problems during your android development. Here we will discuss Some Common Android Development Errors and Solutions. Sometimes your output does not come as you expected. You might face some build errors, some setup errors, configuration errors, Eclipse IDE errors, Android SDK errors, Security errors, Permission errors etc. These kinds of issues are very irritating. In my prior experience, I have faced a lot of issues & solve these as well. So I would like to share some common android issues/errors with solutions with you.

Sample Code for ListView with SQLite Database Connection in Android

Here We are going to discuss 4 important features in android from development prospective with sample code and example.1. How to use ListView in android with example.

2. How to connect to SQLite database in android with example.
3. How to fetch contacts in android.
4. Finally practical use of how to fetch contacts from Contacts database(SQLite Database)and show in Listview in android.

Android Examples With Source Code

Android Examples with Source Code and Description

Here you can download verities of Android Examples with Source Code. To help you understand some fundamental Android APIs and coding practices, a variety of examples and source code are available along with the Android SDK Manager. Each version of the Android platform available with the SDK Manager offers its own set of sample codes for verities of android applications. Also You can download examples with source code for Android Applications from here. Below is the screen shot from the API Demos application. Once you will click on each category, we will find and run related android apps listed below.

You can find the source code for all samples at this location in your local PC, where you downloaded/extracted “Android SDK”:

“Hello World” Android Application Source Code Description

Hello World Source Code Description

At last, Now it is time to start coding!  You need to know details about source code description for your “Hello World” android application. We will learn about auto eclipse generated code for your application. Go to the “src” folder. In this folder, you will find the package folder, open the file. You will see the default code for an Android Activity:

Execution Control Flow of an Android Application

As a beginner we need to know the complete execution control flow of an Android application. To understand the basic execution flow of an Android application, Lets take the  HelloWorld example for detailed explanation.

When we create a new Android project using eclipse, We can see some folders such as “src” ,”gen” , “Android 2.2″ , “assets” and “res” etc.

Directory Structure of an Android Application

Before going to discuss “HelloWorld” application from code prospective, We need to know directory structure of an android application. When we create a new android project from eclipse editor, we can see there are lots of directories created for android applications. Let’s us understand these directories. Let’s start from the top most directory is src directory.