为Hamhead(Nexus 5)构建android 5.0

时间:2014-12-03 05:25:26

标签: android android-5.0-lollipop android-build

我正为5.0 lollipop(Nexus 5)构建hammerhead 我得到以下错误,任何人都可以帮助我

...............
...............
...............
including ./system/media/camera/src/Android.mk ...
including ./system/media/camera/tests/Android.mk ...
including ./system/netd/client/Android.mk ...
including ./system/netd/server/Android.mk ...
including ./system/security/keystore-engine/Android.mk ...
including ./system/security/keystore/Android.mk ...
including ./system/security/softkeymaster/Android.mk ...
including ./system/vold/Android.mk ...
including ./tools/external/fat32lib/Android.mk ...
PRODUCT_COPY_FILES device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml ignored.
No private recovery resources for TARGET_DEVICE hammerhead
target SharedLib: libwebviewchromium (out/target/product/hammerhead/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so)
collect2: error: ld terminated with signal 9 [Killed]
/home/sharanu/work/lollipop/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol '__system_property_get' in out/target/product/hammerhead/obj/STATIC_LIBRARIES/base_base_gyp_intermediates/base_base_gyp.a(sys_info_android.o) is referenced by DSO out/target/product/hammerhead/obj/lib/libcutils.so
/home/sharanu/work/lollipop/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::lockPixels() const' in out/target/product/hammerhead/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO out/target/product/hammerhead/obj/lib/libjnigraphics.so
/home/sharanu/work/lollipop/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::unlockPixels() const' in out/target/product/hammerhead/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO out/target/product/hammerhead/obj/lib/libjnigraphics.so
/home/sharanu/work/lollipop/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin/ld.gold: warning: hidden symbol 'SkBitmap::notifyPixelsChanged() const' in out/target/product/hammerhead/obj/STATIC_LIBRARIES/skia_skia_library_gyp_intermediates/skia_skia_library_gyp.a(SkBitmap.o) is referenced by DSO out/target/product/hammerhead/obj/lib/libjnigraphics.so
make: *** [out/target/product/hammerhead/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so] Error 1
make: *** Deleting file `out/target/product/hammerhead/obj/SHARED_LIBRARIES/libwebviewchromium_intermediates/LINKED/libwebviewchromium.so'

#### make failed to build some targets (01:28:06 (hh:mm:ss)) ####

2 个答案:

答案 0 :(得分:6)

我解决了!! 问题是它没有足够的交换内存,解决方法是增加RAM大小或交换内存。 我在link

之后增加了交换内存

答案 1 :(得分:0)

对于在docker中构建,增加交换内存可以解决它。与

docker-machine ssh

export SWAPFILE=/mnt/sda1/swapfile
sudo dd if=/dev/zero of=$SWAPFILE bs=1024 count=4194304
sudo mkswap $SWAPFILE
sudo chmod 600 $SWAPFILE
sudo swapon $SWAPFILE