Android Project Structure in Eclipse and JAR Dependency

By Arvind Rai, August 14, 2014
To start with android development, it is required to understand the project structure and jar dependency so that there is not compile time error. In the android there are different directories which you can see in your eclipse. We will understand the use of these directories and other files.

Android Project Structure in Eclipse

Before start see the eclipse view of your project structure.
Android Project Structure in Eclipse and JAR Dependency

assets

assets directory is empty. We can keep our raw data in it like game data. When the project is compiled, all the files with its original name are also compiled in .apk file. In the application program, we can read these data using AssetManager. To navigate asset data, we can use typical URI.

bin

This is the output directory of the android project build. Android project is archived as .apk. We can get apk file in bin directory.

gen

Android development tool (ADT) creates the classes in this directory. The classes are like R.java and BuilConfig.java.

libs

Android application has private library dependency. Lib directory keeps those libraries. The jar can be like android-support-v4.jar.

res

Res directory keeps resources of different types.
drawable
Android provides this directory to keep drawable bitmap or images or objects. Drawable object can have multiple states like normal, pressed or focused.
layout
Android provides this directory to keep XML files that defines the screen layout.
menu
This directory has XML files that defines the menu in application.
values
This directory keeps resource XML files. But these resource files are different from res directory files. The element types of these XML files are used to control how the resources are defined and they are placed into R class.

src

This directory keeps our java classes like activity class.

AndroidManifest.xml

This is the android manifest for our project. We define uses-sdk and application definitions.

project.properties

This files keeps the information like project target, android library reference etc.

Jar Dependency for Android Project

There are Jar dependencies that are required to run the application. If not provided there will be compile time error in the project. These jar are given below

1. android-support-v4.jar
2. android-support-v7-appcompat

To get these jar, go to the location where your Android SDK is installed and then navigate to below path

android-sdks/extras/android/support/v7/appcompat/libs
POSTED BY
ARVIND RAI
ARVIND RAI
LEARN MORE








©2024 concretepage.com | Privacy Policy | Contact Us