关闭

【Android入门】Android project files

305人阅读 评论(0) 收藏 举报
分类:

AndroidManifest.xml

The manifest file describes the fundamental characteristics of the app and defines each of its components. 


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 the android:minSdkVersion andandroid:targetSdkVersion attributes. For your first app, it should look like this:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" ... >
    <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
    ...
</manifest>

You should always set the android:targetSdkVersion as high as possible and test your app on the corresponding platform version.


src/
Directory for your app's main source files. By default, it includes an Activity class that runs when your app is launched using the app icon.

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.

When you build and run the default Android app, the default Activity class starts and loads a layout file that says "Hello World." The result is nothing exciting, but it's important that you understand how to run your app before you start developing.

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:7922次
    • 积分:149
    • 等级:
    • 排名:千里之外
    • 原创:6篇
    • 转载:4篇
    • 译文:0篇
    • 评论:2条
    文章分类
    最新评论