The way you wrote that in this message, and the way the error reads,
your native_ClassInit method is part of A, not A$B.

The error message is generated by the VM when it's trying to find a
native method for A.native_ClassInit, not when you do the
registration.  Are you sure the registration call is returning JNI_OK?

On Jul 6, 5:54 am, wu tony <[email protected]> wrote:
> class A{
> static {
> System.loadLibrary("test");};
>
> ...
> public B()
> {}
>
>  private native static void native_ClassInit();
>
> }
>
> When try to register using
> env->RegisterNatives(env,"com/test/A$B",bMethodssizeof(medthods)
> /sizeof(medthods[0]));
>
> I got the following error:
>
> Error info:
> No implementation found for native Lcom/test/A;.native_ClassInit ()V
> Who knows how to do it?
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to