jiangdou 发表于 2015-3-14 16:05
led_jni.cpp是在android的SDK里编译的
有android.mk
嗯,我是放在android SDK上编译的,在SDK android目录下执行:
le@le:/work/le/a20-android/android$ make libled_jni -j8
出现错误:
PRODUCT_COPY_FILES device/softwinner/wing-common/googleservice/gapps-jb-20130301-signed/system/tts/lang_pico/es-ES_zl0_sg.bin:system/tts/lang_pico/es-ES_zl0_sg.bin ignored.
PRODUCT_COPY_FILES device/softwinner/wing-common/googleservice/gapps-jb-20130301-signed/system/tts/lang_pico/fr-FR_nk0_sg.bin:system/tts/lang_pico/fr-FR_nk0_sg.bin ignored.
PRODUCT_COPY_FILES device/softwinner/wing-common/googleservice/gapps-jb-20130301-signed/system/tts/lang_pico/de-DE_ta.bin:system/tts/lang_pico/de-DE_ta.bin ignored.
PRODUCT_COPY_FILES device/softwinner/wing-common/googleservice/gapps-jb-20130301-signed/system/tts/lang_pico/de-DE_gl0_sg.bin:system/tts/lang_pico/de-DE_gl0_sg.bin ignored.
PRODUCT_COPY_FILES device/softwinner/wing-common/googleservice/gapps-jb-20130301-signed/system/tts/lang_pico/fr-FR_ta.bin:system/tts/lang_pico/fr-FR_ta.bin ignored.
PRODUCT_COPY_FILES device/softwinner/wing-common/googleservice/gapps-jb-20130301-signed/system/tts/lang_pico/es-ES_ta.bin:system/tts/lang_pico/es-ES_ta.bin ignored.
PRODUCT_COPY_FILES device/softwinner/wing-common/googleservice/gapps-jb-20130301-signed/system/tts/lang_pico/it-IT_cm0_sg.bin:system/tts/lang_pico/it-IT_cm0_sg.bin ignored.
build/core/Makefile:32: 警告:覆盖关于目标“out/target/product/sugar-cubieboard2/system/lib/libjni_latinime.so”的命令
build/core/base_rules.mk:502: 警告:忽略关于目标“out/target/product/sugar-cubieboard2/system/lib/libjni_latinime.so”的旧命令
build/core/Makefile:32: 警告:覆盖关于目标“out/target/product/sugar-cubieboard2/system/app/cb2-test.apk”的命令
build/core/base_rules.mk:502: 警告:忽略关于目标“out/target/product/sugar-cubieboard2/system/app/cb2-test.apk”的旧命令
build/core/Makefile:32: 警告:覆盖关于目标“out/target/product/sugar-cubieboard2/system/lib/libreference-ril.so”的命令
build/core/base_rules.mk:502: 警告:忽略关于目标“out/target/product/sugar-cubieboard2/system/lib/libreference-ril.so”的旧命令
PRODUCT_COPY_FILES frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml ignored.
No private recovery resources for TARGET_DEVICE sugar-cubieboard2
Import includes file: out/target/product/sugar-cubieboard2/obj/SHARED_LIBRARIES/libled_jni_intermediates/import_includes
make: 放弃循环依赖 .so <- .so 。
make: 放弃循环依赖 .so <- out/target/product/sugar-cubieboard2/symbols/system/lib/libled_jni 。
make: 放弃循环依赖 .so <- .so 。
Export includes file: frameworks/base/cmds/system_server/library/Android.mk -- out/target/product/sugar-cubieboard2/obj/SHARED_LIBRARIES/libled_jni_intermediates/export_includes
target thumb C++: libled_jni <= frameworks/base/cmds/system_server/library/led_jni.cpp
frameworks/base/cmds/system_server/library/led_jni.cpp:35:21: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
target SharedLib: libled_jni (out/target/product/sugar-cubieboard2/obj/SHARED_LIBRARIES/libled_jni_intermediates/LINKED/libled_jni)
/work/le/a20-android/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/sugar-cubieboard2/obj/SHARED_LIBRARIES/libled_jni_intermediates/led_jni.o: in function led_offNative(_JNIEnv*, _jobject*, int):frameworks/base/cmds/system_server/library/led_jni.cpp:74: error: undefined reference to '__android_log_print'
/work/le/a20-android/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/sugar-cubieboard2/obj/SHARED_LIBRARIES/libled_jni_intermediates/led_jni.o: in function led_onNative(_JNIEnv*, _jobject*, int):frameworks/base/cmds/system_server/library/led_jni.cpp:65: error: undefined reference to '__android_log_print'
/work/le/a20-android/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/sugar-cubieboard2/obj/SHARED_LIBRARIES/libled_jni_intermediates/led_jni.o: in function JNI_OnLoad:frameworks/base/cmds/system_server/library/led_jni.cpp:119: error: undefined reference to '__android_log_print'
/work/le/a20-android/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-androideabi/bin/ld: out/target/product/sugar-cubieboard2/obj/SHARED_LIBRARIES/libled_jni_intermediates/led_jni.o: in function JNI_OnLoad:frameworks/base/cmds/system_server/library/led_jni.cpp:123: error: undefined reference to '__android_log_print'
collect2: ld returned 1 exit status
make: *** [out/target/product/sugar-cubieboard2/obj/SHARED_LIBRARIES/libled_jni_intermediates/LINKED/libled_jni] 错误 1
另外,Eclipse上的java代码是不是也放在SDK上编译
|