我正在尝试从Nexus One的源代码编译Android(Froyo)。我几乎遵循了here中的所有说明。
尽管说明是针对姜饼的,但对于Froyo来说,我看不出太大的区别。在执行“ make -j4”之后,将引发以下错误:
Install: out/target/product/passion/system/lib/libmedia.so
target SharedLib: libstagefright_foundation (out/target/product/passion/obj/SHARED_LIBRARIES/libstagefright_foundation_intermediates/LINKED/libstagefright_foundation.so)
target SharedLib: libstagefright_color_conversion (out/target/product/passion/obj/SHARED_LIBRARIES/libstagefright_color_conversion_intermediates/LINKED/libstagefright_color_conversion.so)
target SharedLib: libaudio (out/target/product/passion/obj/SHARED_LIBRARIES/libaudio_intermediates/LINKED/libaudio.so)
target SharedLib: libaudiopolicy (out/target/product/passion/obj/SHARED_LIBRARIES/libaudiopolicy_intermediates/LINKED/libaudiopolicy.so)
target SharedLib: libcameraservice (out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so)
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::getCameraInfo(int, android::CameraInfo*):frameworks/base/services/camera/libcameraservice/CameraService.cpp:109: error: undefined reference to 'HAL_getCameraInfo'
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::CameraService():frameworks/base/services/camera/libcameraservice/CameraService.cpp:75: error: undefined reference to 'HAL_getNumberOfCameras'
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::CameraService():frameworks/base/services/camera/libcameraservice/CameraService.cpp:75: error: undefined reference to 'HAL_getNumberOfCameras'
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::connect(android::sp<android::ICameraClient> const&, int):frameworks/base/services/camera/libcameraservice/CameraService.cpp:148: error: undefined reference to 'HAL_openCameraHardware'
prebuilt/darwin-x86/toolchain/arm-eabi-4.4.3/bin/../lib/gcc/arm-eabi/4.4.3/../../../../arm-eabi/bin/ld: out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/CameraService.o: in function android::CameraService::connect(android::sp<android::ICameraClient> const&, int):frameworks/base/services/camera/libcameraservice/CameraService.cpp:154: error: undefined reference to 'HAL_getCameraInfo'
collect2: ld returned 1 exit status
make: *** [out/target/product/passion/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so] Error 1
make: *** Waiting for unfinished jobs....
Note: cts/tools/dx-tests/src/dxc/junit/opcodes/invokeinterface/jm/T_invokeinterface_1.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
compiling all jasmin (*.j)
compiling all .cfh files into .class files
generating Main_*.java files reading from cts/tools/dx-tests writing to out/host/darwin-x86/obj/EXECUTABLES/dx-tests_intermediates/mainfiles
using java src:cts/tools/dx-tests/src
Collecting all junit tests...
Time: 0.025
OK (0 tests)
有人可以帮我解决这个问题吗?
最佳答案
该函数在Froyo中名为getCameraInfo()
,但在Gingerbread中已更改为HAL_getCameraInfo()
。因此,从Froyo机器提取的动态库libcamera.so
在Gingerbread构建中不起作用。
我不确定您是否能够绕过这个……