wKioL1LmnULh-bMxAAFmnhmvZGo519.jpg

src目录:

   java代码源文件。


gen目录

   R.java静态内部类,系统自动生成,无需程序员维护。


assets目录

   资源目录,html,多媒体文件。


bin目录

   应用程序所生成的apk


res目录

   drawable:hdpi,mdpi,ldpi。默认png格式的图片。

   layout:布局。

   menu:菜单。

   values:存放字符串或数值等常量。

       strings.xml(字符串)     取值方式:getResource().getString(resourceId)

       colors.xml(颜色)        取值方式:getResource().getColor(resourceId)

       arrays.xml(数组)        取值方式:getResource().getStringArray(resourceId)

       dimens.xml(尺寸)        取值方式:getResource().getDimension(resourceId)

       styles.xml(样式)        无需取值


AndroidManifest.xml文件:

   包含该项目中所使用的Actitity,Service,Receiver。

   是每个Android项目都必须有的文件。


<?xml version="1.0" encoding="utf-8"?>
<!--
    manifest                 根节点,描述了package中的所有内容
    android:versionCode      所生成的apk的版本号
    android:versionName      版本的一个名称
    android:installLocation: 安装路径
        "auto" 自动寻找安装的地方,ROM或者SDcard卡。默认属性
        "internalOnly" 仅仅只能安装在ROM
        "preferExternal" 会直接安装在SDcard卡
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.hello"
    android:versionCode="1"
    android:versionName="1.0"
    android:installLocation="auto">
<!--
    uses-sdk 所使用的sdk的版本相关
-->
    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="18" />
<!--
    android:icon      应用程序的logo图标
    android:label     应用程序的名字
    android:name      应用程序的主程序的名称,默认启动的activity
    intent-filter     意图过滤器:用来过滤用户的一些动作和操作
    category android:name    表示决定应用程序是否在程序列表中显示
-->
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.hello.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
              <action android:name="android.intent.action.MAIN" />
              <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>