1.1.2 Getting Started_Budding Your First App_Running Your App
AndroidManifest.xml- The manifest file describes the fundamental characteristics of the app and defines each of its components. You'll learn about various declarations in this file as you read more training classes.
One of the most important elements your manifest should include is the
<uses-sdk>element. This declares your app's compatibility with different Android versions using theandroid:minSdkVersionandandroid:targetSdkVersionattributes. For your first app, it should look like this:<manifestxmlns:android="http://schemas.android.com/apk/res/android" ... >
<uses-sdkandroid:minSdkVersion="8"android:targetSdkVersion="17"/>
...
</manifest>You should always set the
android:targetSdkVersionas high as possible and test your app on the corresponding platform version. For more information, read Supporting Different Platform Versions.manifest文件描述了应用的基本特性,定义了每一个组件。
manifest文件应该包含的最重要的元素之一是<uses-sdk>元素。它用android:minSdkVersion和
android:targetSdkVersion属性声明了你的应用兼容不同的android版本 src/- Directory for your app's main source files. By default, it includes an
Activityclass that runs when your app is launched using the app icon. - 应用的主要资源文件的目录。它默认包含一个Activity,当你的应用通过使用应用图标启动时,该Activity会运行
res/- Contains several sub-directories for app resources. Here are just a few:
drawable-hdpi/- Directory for drawable objects (such as bitmaps) that are designed for high-density (hdpi) screens. Other drawable directories contain assets designed for other screen densities.
layout/- Directory for files that define your app's user interface.
values/- Directory for other various XML files that contain a collection of resources, such as string and color definitions.
- 包含多个子目录存放应用资源。下面是其中的一些子目录:

浙公网安备 33010602011771号