When compiling the Hal layer of Android 4.0, the following error message is displayed:
Root @ brantyou-Ubuntu :~ /Workspace/android-4.0.4_r1.2 # Mmm Hardware/libhardware/modules/Hello/====================== ========================== relplatform_version = 4.0.4target _ Product = fulltarget_build_variant = engtarget_build_type = target_arch = Signature = armv7-aHOST_ARCH = x86host_ OS = linuxhost_build_type = releasebuild_id = imm76i ================================ ========== Make: Enter the directory '/home/brantyou/workspace/android-4.0.4_r1.2' Make: *** no rule can be created for "Out/target/product/generic/obj/shared_libraries/hello. default_intermediates/linked/hello. default. so "target" out/target/product/generic/obj/lib/liblog. so ". Stop. Make: Leave the directory "/home/brantyou/workspace/android-4.0.4_r1.2" root @ brantyou-Ubuntu :~ /Workspace/android-4.0.4_r1.2 # ls out/target/product/generic/obj/lib/crtbegin_dynamic.o crtend_android.o libc. So libm. javascrtend_so.o libdl. So libstdc ++. So
As you can see, there is no liblog. So library file under the corresponding directory.
Through searching, we found that liblog is located in the system/CORE/folder under the android source code directory, and its code is found below.
Here, we need to compile and generate the library file through the command:
make liblog
For example:
root@brantyou-ubuntu:~/workspace/android-4.0.4_r1.2# make liblog============================================PLATFORM_VERSION_CODENAME=RELPLATFORM_VERSION=4.0.4TARGET_PRODUCT=fullTARGET_BUILD_VARIANT=engTARGET_BUILD_TYPE=releaseTARGET_BUILD_APPS=TARGET_ARCH=armTARGET_ARCH_VARIANT=armv7-aHOST_ARCH=x86HOST_OS=linuxHOST_BUILD_TYPE=releaseBUILD_ID=IMM76I============================================target thumb C: liblog <= system/core/liblog/logd_write.ctarget thumb C: liblog <= system/core/liblog/logprint.ctarget thumb C: liblog <= system/core/liblog/event_tag_map.ctarget StaticLib: liblog (out/target/product/generic/obj/STATIC_LIBRARIES/liblog_intermediates/liblog.a)target SharedLib: liblog (out/target/product/generic/obj/SHARED_LIBRARIES/liblog_intermediates/LINKED/liblog.so)target Symbolic: liblog (out/target/product/generic/symbols/system/lib/liblog.so)target Strip: liblog (out/target/product/generic/obj/lib/liblog.so)Notice file: system/core/liblog/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/liblog.so.txtNotice file: system/core/liblog/NOTICE -- out/target/product/generic/obj/NOTICE_FILES/src//system/lib/liblog.a.txtInstall: out/target/product/generic/system/lib/liblog.so
The last sentence indicates that the database has been generated. This solves the problem.
I am new to Android underlying development and have encountered many problems. I can't find many questions online, so I have to come by myself ~~