undefined reference to 'register_android_mytest_hellojni(_JNIEnv*)'问题
我参考网上:一个打通jni,java framework,application三层的练习
http://blog.chinaunix.net/uid-7922708-id-3043552.html
完全按照步骤做的,现在我在frameworks/base/core/jni目录下面敲mm编译出现如下错误:
target thumb C++: libandroid_runtime <= frameworks/base/core/jni/android_mytest_hellojni.cpp
target thumb C++: libandroid_runtime <= frameworks/base/core/jni/AndroidRuntime.cpp
target SharedLib: libandroid_runtime (out/target/product/msm8660_surf/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/LINKED/libandroid_runtime.so)
prebuilt/linux-x86/toolchain/arm-linux-androideabi-4.4.x/bin/../lib/gcc/arm-linux-androideabi/4.4.3/../../../../arm-linux-androideabi/bin/ld: out/target/product/msm8660_surf/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/AndroidRuntime.o: in function android::gRegJNI:AndroidRuntime.cpp(.data.rel.ro._ZN7androidL7gRegJNIE+0x0): error: undefined reference to 'register_android_mytest_hellojni(_JNIEnv*)'
collect2: ld returned 1 exit status
上面的问题有人问过,不过没有人回答,我也遇到了同样的问题,还请高人指点!