编译Android模拟器(make sdk),以及错误处理

编译Android模拟器(make sdk),会报错(couldn't locate source file)!
网上说,先lunch sdk-eng,再编译,就可以了,试试看!

gaojs@ubuntu:~/work/android-4.0.4_r1.2$ source build/envsetup.sh
including device/moto/stingray/vendorsetup.sh
including device/moto/wingray/vendorsetup.sh
including device/samsung/smdk4x12/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash

gaojs@ubuntu:~/work/android-4.0.4_r1.2$ lunch sdk-eng
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=sdk
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76I
============================================

gaojs@ubuntu:~/work/android-4.0.4_r1.2$ lunch 7
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=full_smdk4x12
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76I
============================================

由于lunch sdk-eng跟lunch 7的参数不同,不能那样弄!
所以,还是看看怎么解决如下的这些错吧!

Docs droiddoc: out/target/common/docs/online-sdk
DroidDoc took 233 sec. to write docs to out/target/common/docs/online-sdk
Package SDK: out/host/linux-x86/sdk/android-sdk_eng.gaojs_linux-x86.zip
SDK: warning: including GNU target out/target/product/smdk4x12/system/lib/libbluetooth.so
SDK: warning: including GNU target out/target/product/smdk4x12/system/lib/libbluetoothd.so
SDK: warning: including GNU target out/target/product/smdk4x12/system/lib/libbtio.so
SDK: warning: including GNU target out/target/product/smdk4x12/system/lib/libdbus.so
development/build/sdk.atree:239: couldn't locate source file: framework/layoutlib-tests.jar
development/build/sdk.atree:240: couldn't locate source file: system/app/ConnectivityTest.apk
development/build/sdk.atree:241: couldn't locate source file: system/app/GpsLocationTest.apk
sdk/build/tools.atree:47: couldn't locate source file: usr/share/pc-bios/bios.bin
sdk/build/tools.atree:48: couldn't locate source file: usr/share/pc-bios/vgabios-cirrus.bin
sdk/build/tools.atree:51: couldn't locate source file: lib/libOpenglRender.so
sdk/build/tools.atree:52: couldn't locate source file: lib/libGLES_CM_translator.so
sdk/build/tools.atree:53: couldn't locate source file: lib/libGLES_V2_translator.so
sdk/build/tools.atree:54: couldn't locate source file: lib/libEGL_translator.so
sdk/build/tools.atree:64: couldn't locate source file: bin/lint
sdk/build/tools.atree:151: couldn't locate source file: framework/ddmlib-tests.jar
sdk/build/tools.atree:152: couldn't locate source file: framework/ninepatch-tests.jar
sdk/build/tools.atree:153: couldn't locate source file: framework/common-tests.jar
sdk/build/tools.atree:155: couldn't locate source file: framework/sdkuilib-tests.jar
make: *** [out/host/linux-x86/sdk/android-sdk_eng.gaojs_linux-x86.zip] Error 44

Source Insight里搜了一下,在如下两个mk里包含layoutlib-tests:
---- layoutlib-tests Matches (2 in 2 files) ----
Android.mk (frameworks\base\tools\layoutlib\bridge\tests):LOCAL_MODULE := layoutlib-tests
Sdk.mk (build\target\product): layoutlib-tests

编译layoutlib-tests模块,生成对应的jar库:
$ mmm frameworks/base/tools/layoutlib/bridge/tests
make: Entering directory `/home/gaojs/work/android-4.0.4_r1.2'
Install: out/host/linux-x86/framework/layoutlib-tests.jar
make: Leaving directory `/home/gaojs/work/android-4.0.4_r1.2

然后,再编译sdk,就能找到layoutlib-tests.jar!
也可以直接在sdk.atree和tools.atree里,将找不到的模块注掉! 
不清楚这样直接注掉,会产生什么不良影响,但至少能编译通过了!

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值