02-03 18:01:59.117: DEBUG/dalvikvm(6102): Trying to load lib /data/
data/com.test.app/lib/libdrone.so 0x4470eec8
02-03 18:01:59.117: DEBUG/dalvikvm(6102): Added shared lib /data/data/
com.test.app/lib/libdrone.so 0x4470eec8
02-03 18:01:59.117: DEBUG/dalvikvm(6102): No JNI_OnLoad found in /data/
data/com.test.app/lib/libdrone.so 0x4470eec8
02-03 18:01:59.127: DEBUG/ViewFlipper(136): updateRunning()
mVisible=false, mStarted=true, mUserPresent=true, mRunning=false
02-03 18:01:59.147: DEBUG/SensorManager(6102): found sensor: BMA150 3-
axis Accelerometer, handle=0
02-03 18:01:59.147: DEBUG/SensorManager(6102): found sensor: AK8973 3-
axis Magnetic field sensor, handle=1
02-03 18:01:59.147: DEBUG/SensorManager(6102): found sensor: AK8973
Orientation sensor, handle=2
02-03 18:01:59.147: DEBUG/SensorManager(6102): found sensor: CM3602
Proximity sensor, handle=4
02-03 18:01:59.147: DEBUG/SensorManager(6102): found sensor: CM3602
Light sensor, handle=5
02-03 18:01:59.147: DEBUG/dalvikvm(6102): +++ not scanning '/system/
lib/libwebcore.so' for 'nativeInit' (wrong CL)
02-03 18:01:59.147: DEBUG/dalvikvm(6102): +++ not scanning '/system/
lib/libmedia_jni.so' for 'nativeInit' (wrong CL)
02-03 18:01:59.147: DEBUG/dalvikvm(6102): +++ not scanning '/system/
lib/libexif.so' for 'nativeInit' (wrong CL)
02-03 18:01:59.147: DEBUG/dalvikvm(6102): +++ not scanning '/system/
lib/libsrec_jni.so' for 'nativeInit' (wrong CL)
02-03 18:01:59.147: WARN/dalvikvm(6102): No implementation found for
native Lcom/test/app/DroneController;.nativeInit ()V
02-03 18:01:59.147: DEBUG/AndroidRuntime(6102): Shutting down VM
02-03 18:01:59.147: WARN/dalvikvm(6102): threadid=3: thread exiting
with uncaught exception (group=0x4001b178)
02-03 18:01:59.147: ERROR/AndroidRuntime(6102): Uncaught handler:
thread main exiting due to uncaught exception
Somebody can help me please ?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
JNIExport void
Java_com_parrot_ARDrone_DemoRenderer_nativeInit( JNIEnv* env )
{
//importGLInit();
appInit();
sDemoStopped = 0;
sTimeOffsetInit = 0;
}
I am not sure if it begins by JNIExport or not but it should be
something like that. It's the same as the generated .h file (using
javah). In the .h file these methods are declared as exter "C" .
Should I declare extern "C" in the .c file also ?
The error message says:
No implementation found for native Lcom/test/app/
DroneController;.nativeInit ()V
So it's looking for Java_com_test_app_DroneController_nativeInit
(assuming you're not registering functions manually).
JNIEXPORT void
Java_com_test_app_DroneController_nativeInit( JNIEnv* env ,jobject
thiz)
{
//importGLInit();
appInit();
sDemoStopped = 0;
sTimeOffsetInit = 0;
}
and here is the declaration in android.h file (generated using javah
tool)
extern "C" {
#endif
/*
* Class: com_parrot_ardrone_app_DroneController
* Method: nativeInit
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_app_DroneController_nativeInit
(JNIEnv *, jobject);
#ifdef __cplusplus
}
I'm running on windows SP3 using cygwin and gcc 3.81.
In the log file , libadrone.so is loaded but the dalvikVm never seeks
the nativeInit function there :
02-03 18:01:59.147: DEBUG/dalvikvm(6102): +++ not scanning '/system/
lib/libwebcore.so' for 'nativeInit' (wrong CL)
02-03 18:01:59.147: DEBUG/dalvikvm(6102): +++ not scanning '/system/
lib/libmedia_jni.so' for 'nativeInit' (wrong CL)
02-03 18:01:59.147: DEBUG/dalvikvm(6102): +++ not scanning '/system/
lib/libexif.so' for 'nativeInit' (wrong CL)
02-03 18:01:59.147: DEBUG/dalvikvm(6102): +++ not scanning '/system/
lib/libsrec_jni.so' for 'nativeInit' (wrong CL)
02-03 18:01:59.147: WARN/dalvikvm(6102): No implementation found for
native Lcom/test/app/DroneController;.nativeInit ()V
Should I implement JNI_OnLoad by my self ?
On Feb 5, 9:57 am, Houcem Berrayana <houcem.berray...@gmail.com>
wrote:
I don't know how to fix this. I'm testing with the example hello-gl2.
I just doubled the function public static native void init(int width,
int height);, replace function name "init" by "test".
Then go to gl_code.cpp, double the function JNIEXPORT void JNICALL
Java_com_android_gl2jni_GL2JNILib_init(JNIEnv * env, jobject obj,
jint width, jint height);, replace function name "init" by "test".
Then implement
JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_test(JNIEnv *
env, jobject obj, jint width, jint height)
{
}
and build project, then run and get the error message.
Thanks,
On Feb 4, 11:29 pm, David Turner <di...@android.com> wrote:
> No JNI_OnLoad is perfectly normal, it's only a debug message. The problem
> seems to be later:
>
> 02-03 18:01:59.147: WARN/dalvikvm(6102): No implementation found for
> native Lcom/test/app/DroneController;.nativeInit ()V
>
> Are you sure you implemented Java_com_test_app_DroneController_nativeInit
> correctly and used extern "C" linkage, in case it was implemented in C++ ?
>
> On Thu, Feb 4, 2010 at 7:33 AM, Houcem Berrayana <houcem.berray...@gmail.com
> > android-ndk...@googlegroups.com<android-ndk%2Bunsubscribe@googlegr oups.com>
[...]
JNIEXPORT void JNICALL Java_com_android_gl2jni_GL2JNILib_test(JNIEnv *
env, jobject obj, jint width, jint height)
JNIEXPORT void JNICALL Java_HelloWorld_print(JNIEnv *env, jobject obj) { printf("Hello World!\n"); return; }
there is only one cpp file
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.