Chinaunix首页 | 论坛 | 博客
  • 博客访问: 567021
  • 博文数量: 213
  • 博客积分: 6789
  • 博客等级: 准将
  • 技术积分: 1947
  • 用 户 组: 普通用户
  • 注册时间: 2009-09-01 17:11
文章分类

全部博文(213)

文章存档

2012年(9)

2011年(62)

2010年(99)

2009年(43)

分类: 嵌入式

2011-01-27 18:47:11

chechunli@chechunli-PC:testapp $ pwd
/home/chechunli/android/froyo/packages/apps/testapp
chechunli@chechunli-PC:testapp $ tree

.
├── AndroidManifest.xml
├── Android.mk
├── res
│   ├── drawable
│   │   └── icon.png
│   ├── layout
│   │   └── main.xml
│   └── values
│       └── strings.xml
└── src
    └── com
        └── android
            └── test
                └── test.java

8 directories, 6 files

chechunli@chechunli-PC:testapp $ cat AndroidManifest.xml 

    package="com.android.test">

    
        android:icon="@drawable/icon"
        android:label="@string/app_name">
        
            android:name="test"
            android:label="@string/app_name">
            
                
                
            
        
    

chechunli@chechunli-PC:testapp $ cat Android.mk 
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_SRC_FILES := $(call all-java-files-under, src)

LOCAL_PACKAGE_NAME := test
LOCAL_CERTIFICATE := platform

include $(BUILD_PACKAGE)

# Use the folloing include to make our test apk.
include $(call all-makefiles-under,$(LOCAL_PATH))

chechunli@chechunli-PC:testapp $ cat res/layout/main.xml 

        xmlns:android=""
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">

    
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/hello" 
        />
        

chechunli@chechunli-PC:testapp $ cat res/values/strings.xml 
    Hello World
    HelloWorld

chechunli@chechunli-PC:testapp $ cat src/com/android/test/test.java 
package com.android.test;

import android.app.Activity;
import android.os.Bundle;

import android.widget.TextView;

public class test extends Activity
{
    @Override
        public void onCreate(Bundle savedInstanceState)
        {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
        }
}

/res/drawable/icon.png 随便找个png图片,这个图片是apk的图标
阅读(2244) | 评论(0) | 转发(0) |
0

上一篇:linux setup android env

下一篇:notification apk

给主人留下些什么吧!~~