歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux編程 >> Linux編程

Android 編譯SDK 問題匯總

Android 3.2 qcom 8660,總結一下遇到的問題。

編譯android sdk問題匯總:

官方的文檔和問題:

src/sdk/docs/howto_build_SDK

  $ . build/envsetup.sh

  $ lunch sdk-eng

  $ make sdk

   Package SDK: out/host/darwin-x86/sdk/android-sdk_eng.<build-id>_mac-x86.zip

make window sdk 需要mingw的支持

  $ make win_sdk

實際工作的步驟

1. 修改 ”\4030\external\libvpx\vpx_config.h” 如下

//#define CONFIG_ARM_ASM_DETOK 1

2. $ source build/envsetup.sh

    lunch 1 ; make

3. $ lunch sdk-eng

4. $ make sdk

在 out/host/linux-x86/sdk/android-sdk_eng.xxxx_linux-x86.zip 下

注意: android-sdk_eng.xxxx_linux-x86.zip 並不包含 emulator,

你必須手動將out/host/linux-x86/bin/emulator 復制到 android-sdk_eng.xxxx_linux-x86.zip/android-sdk_eng.xxxx_linux-x86/tools/  下

問題匯總,qcom的BSP也有許多問題。在android 標准的sdk上修改了許多。有些在原先在android標准的版本上沒有的:經歷了幾個版本,問題先後記錄如下:
 
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
ERROR 1:
 error: undefined reference to 'vp8_decode_mb_tokens_v6'
make sdk error:
target SharedLib: libstagefright (out/target/product/generic/obj/SHARED_LIBRARIES/libstagefright_intermediates/LINKED/libstagefright.so)
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/generic/obj/STATIC_LIBRARIES/libvpx_intermediates/libvpx.a(detokenize.o): in function vp8_decode_mb_tokens:external/libvpx/vp8/decoder/detokenize.c:223: error: undefined reference to 'vp8_decode_mb_tokens_v6'
collect2: ld returned 1 exit status
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libstagefright_intermediates/LINKED/libstagefright.so] 錯誤 1
 
修改方法:
1. 修改 ”\4030\external\libvpx\vpx_config.h” 如下

//#define CONFIG_ARM_ASM_DETOK 1  這句話是針對armv6的。sdk的模擬器是armv5,所以不需要


$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

ERROR2:

Package SDK: out/host/linux-x86/sdk/android-sdk_eng.liuhongchao_linux-x86.zip

SDK: warning: including GNU target out/target/product/msm8660_surf/system/lib/libdbus.so

sdk/build/tools.atree:46: couldn't locate source file: usr/share/pc-bios/bios.bin

sdk/build/tools.atree:47: couldn't locate source file: usr/share/pc-bios/vgabios-cirrus.bin

sdk/build/tools.atree:133: couldn't locate source file: framework/ddmlib-tests.jar

sdk/build/tools.atree:134: couldn't locate source file: framework/ninepatch-tests.jar

sdk/build/tools.atree:135: couldn't locate source file: framework/common-tests.jar

sdk/build/tools.atree:137: couldn't locate source file: framework/sdkuilib-tests.jar

make: *** [out/host/linux-x86/sdk/android-sdk_eng.liuhongchao_linux-x86.zip] Error 44

NO sdk/android-sdk_eng.liuhongchao_linux-x86.zip created

解決辦法:

這裡的framework目錄指的是:~/Android_Src/out/host/linux-x86/framework   這個目錄,

是sdk/build/tools.atree這個文件有bug,上面那幾個文件的路徑寫的不對,其實在

Src/out/host/linux-x86/framework 目錄下是有這幾個文件的,

$cp ~/Android_Src/prebuilt/common/pc-bios   ~/Android_Src/usr/share

$ cd ~/Android_Src/out/host/linux-x86/framework

$cp ddmlib.jar  ddmlib-test.jar  

$cp sdkuilib.jar  sdkuilib-test.jar //其他同樣
 
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
ERROR 3:
emulator 顯示為offline ,無法連接adb調試程序。
使用cmd   查看emulator 啟動log如下:
 
liuhongchao@liuhongchao-ThinkCentrer:~/sdk/4037/4037-orig-qcom/out/host/linux-x86/bin$ ./emulator -verbose -shell -kernel ../../../../prebuilt/android-arm/kernel/kernel-qemu -sysdir ../../../../out/debug/target/product/generic/ -system system.img -data userdata.img
 
跟蹤代碼git log:發現
in file android_src/system/core/rootdir/etc/init.qcom.rc you modify line 535 like next :
 
# WNC:Eaddy 2011/08/23 : Disable the "Failed to locate modem.mdt" error message
#service qmuxd /system/bin/qmuxd
# class main
關鍵的emulator 服務被屏蔽了#service qmuxd /system/bin/qmuxd
去掉屏蔽問題解決
 
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
ERROR 4:
linux sdk 可以使用。windows sdk啟動黑屏
qocm的問題,新版本解決了。沒找到什麼原因
只是qcom回答,在Make adk之前,需要先 lunch 1;make
lunch 1 就是make full

Copyright © Linux教程網 All Rights Reserved