當前位置:首頁 » 操作系統 » linuxbuild

linuxbuild

發布時間: 2024-08-11 10:01:07

① android 怎麼使用icu

如果只是測試修改後效果,執行步驟A即可;如果需要build後生效,則需要執行全部步驟
A. 在臨時目錄中編譯ICU資源
1. 在external/icu4c下新建臨時目錄icubuild,進入icubuild目錄
$mkdir external/icu4c/icuBuild
$cd external/icu4c/icuBuild
2. 執行icuConfigureRun linux命令,生成make文件
$.././runConfigureICU Linux
3. 執行make -j2命令,
$make -j2
對於GB版本,如果make -j2出錯,需要用mtk提供的文件(Android 2.3 make-j2 ERROE.rar)替換(需要備份原文件)。
4. 將生成的external/icu4c/icuBuild/data/out/tmp/icudt44l.dat push到手機測試
$adb remount
$adb push external/icu4c/icuBuild/data/out/tmp/icudt44l.dat system/usr/icu/
$adb reboot
ICS對應的是icudt46l.dat,
JB以及以後版本是icudt48l.dat
B. COPY所需文件
1、將第一步生成的externalicu4cicubuilddataout mpicudt44l.dat復制到externalicu4cstubdata下並改名為icudt44l-all.dat,覆蓋原來的同名文件。
2、對於GB版本,從ICS工程上拷貝路徑prebuildlinux-x86icu-4.4文件夾,放到相應的路徑下
ICS版本是icudt46l.dat和icudt46l-all.dat
JB及以上是icudt48l.dat和icudt48l-all.dat
C. 配置環境變數
重新配置環境變數(如果不配置正確會導致執行腳本出錯)。以我的系統為例,配置過程如下:
1. 在終端中進入/proj/mtk71491/Desktop/GB/alps目錄即:
$cd /proj/mtk71491/Desktop/GB/alps
2. 然後執行腳本(等價於./ build/envsetup.sh):
$source build/envsetup.sh
3. 配置環境變數(注意「=」前後不要有空格)。
$export ANDROID_EABI_TOOLCHAIN=/proj/mtk71491/Desktop/GB/alps/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/(JB2以及以上不執行此步驟)
$export LD_LIBRARY_PATH=/proj/mtk71491/Desktop/GB/alps/prebuilt/linux-x86/icu-4.4/(JB以及上以跳過這一步)
$export ANDROID_BUILD_TOP=/proj/mtk71491/Desktop/GB/alps/
執行完沒有任何提示說明配置成功。
D. 執行腳本,重新生成.dat文件
執行腳本,如果遇到文檔印尼語錯誤請用MTK提供的腳本(icu_dat_generator.rar)替換後再執行,如下所示:
1. 進入/proj/mtk71491/Desktop/GB/alps/external/icu4c/studdata目錄
$cd external/icu4c/studdata
2. 執行腳本
$./icu_dat_generator.py 4.4 (ICS及以後版本執行$./icu_dat_generator.py)
如果該腳本執行成功,則會更新一遍stubdata下的icudt44l-**.dat這些文件,如果看到這些文件的修改時間變成了最新的時間,就說明已經重新生成真正最後起 作用的是icudt44l-large.dat這個文件。
ICS版是icudt46l-default.dat
JB以及以上是icudt48l-default.dat
E. 重新編譯工程
一般修改後都是重新編譯工程來測試效果,使用remake android命令即可.
F. 如果執行./icu_dat_generator.py報以下錯誤
Traceback (most recent call last):
File ./icu_dat_generator.py, line 296, in
main()
File ./icu_dat_generator.py, line 261, in main
icu_version = re.sub(r([^0-9]), , os.path.basename(input_files[0]))
IndexError: list index out of range
可能是環境變數沒有配置好,請使用絕對路徑,而不是相對路徑。

熱點內容
c語言大學教程第六版 發布:2025-05-19 16:04:21 瀏覽:740
androidvr播放器 發布:2025-05-19 15:55:32 瀏覽:964
我的世界pc如何創建伺服器 發布:2025-05-19 15:51:24 瀏覽:733
搶腳本 發布:2025-05-19 15:47:14 瀏覽:406
ct4哪個配置性價比最高 發布:2025-05-19 15:38:02 瀏覽:953
如何設置強緩存的失效時間 發布:2025-05-19 15:21:28 瀏覽:695
winxp無法訪問 發布:2025-05-19 15:19:48 瀏覽:947
文件預編譯 發布:2025-05-19 15:14:04 瀏覽:643
怎麼在伺服器上掛公網 發布:2025-05-19 15:14:02 瀏覽:272
濟南平安e通如何找回密碼 發布:2025-05-19 14:56:58 瀏覽:176