Android培训班(51)

接着来修改一下资源,看看是否可以显示出来?通过如下步骤进处:

1)找到目录Android-2.0/packages/apps/Calculator/res/values-zh-rCH

2)打开资源文件strings.xml

3)找到“清除历史记录”,把它改为“删除历史记录”,如下图:

 

4)进入终端里编译,如下:

tony@tony-desktop:~/android/Android-2.0/packages/apps/Calculator$ mm

============================================

PLATFORM_VERSION_CODENAME=AOSP

PLATFORM_VERSION=AOSP

TARGET_PRODUCT=generic

TARGET_BUILD_VARIANT=eng

TARGET_SIMULATOR=

TARGET_BUILD_TYPE=release

TARGET_ARCH=arm

HOST_ARCH=x86

HOST_OS=linux

HOST_BUILD_TYPE=release

BUILD_ID=MASTER

============================================

make:进入目录'/home/tony/android/Android-2.0'

target R.java/Manifest.java: Calculator (out/target/common/obj/APPS/Calculator_intermediates/src/R.stamp)

target Java: Calculator (out/target/common/obj/APPS/Calculator_intermediates/classes)

注意:packages/apps/Calculator/src/com/android/calculator2/Calculator.java 使用或覆盖了已过时的 API

注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。

Copying: out/target/common/obj/APPS/Calculator_intermediates/classes-full-debug.jar

Copying: out/target/common/obj/APPS/Calculator_intermediates/classes.jar

target Dex: Calculator

target Package: Calculator (out/target/product/generic/obj/APPS/Calculator_intermediates/package.apk)

'out/target/common/obj/APPS/Calculator_intermediates/classes.dex' as 'classes.dex'...

target Java: CalculatorTests (out/target/common/obj/APPS/CalculatorTests_intermediates/classes)

注意:packages/apps/Calculator/tests/src/com/android/calculator2/CalculatorHitSomeButtons.java 使用或覆盖了已过时的 API

注意:要了解详细信息,请使用 -Xlint:deprecation 重新编译。

Copying: out/target/common/obj/APPS/CalculatorTests_intermediates/classes-full-debug.jar

Copying: out/target/common/obj/APPS/CalculatorTests_intermediates/classes.jar

target Dex: CalculatorTests

target Package: CalculatorTests (out/target/product/generic/obj/APPS/CalculatorTests_intermediates/package.apk)

'out/target/common/obj/APPS/CalculatorTests_intermediates/classes.dex' as 'classes.dex'...

Install: out/target/product/generic/data/app/CalculatorTests.apk

Install: out/target/product/generic/system/app/Calculator.apk

make:离开目录“/home/tony/android/Android-2.0”

 

4)编译后把包文件Calculator.apk拷贝到NFS目录下,再打开开发板电源,运行显示,如下图:

 

可以看到开发板里运行并显示为预期的结果。

//QQ: 9073204 EMAIL:[email protected]

//蔡军生  2011-05-29

你可能感兴趣的:(android)