cannot resolve corresponding jni function. Reports native method declaration in java where no corresponding JNI function is found in project.

  • Replies:5
Gayathri Sekaran
  • Forum posts: 9

Aug 20, 2018, 9:13:27 AM via Website

Hi,
I have gone through many posts and i couldn't find a solution till now. I am getting the warning message as "cannot resolve corresponding JNI function. Reports native method declaration in java where no corresponding JNI function is found in project." I tried using @SuppressWarnings("JniMissingFunction"). The warning went but it is not generation the .so file. I don't know where i am wrong. Please help me. image

Reply
James Watson
  • Forum posts: 1,584

Aug 20, 2018, 9:54:36 AM via Website

Check the package name of your library declared, the package name imported in your app, and which folder structure the library actually locates.

— modified on Aug 20, 2018, 10:07:33 AM

Download size < 0.15 MB. But also accurate enough, ad-free & free.
The minimalist app available on Play Store: https://goo.gl/ws42fN
Blog: https://okblackcafe.blogspot.com Your 5-star is appreciated.

Helpful?
Reply
Gayathri Sekaran
  • Forum posts: 9

Aug 20, 2018, 10:29:20 AM via Website

My package name is Java_com_example_gayu_helloworld_mainfn

Helpful?
Reply
James Watson
  • Forum posts: 1,584

Aug 20, 2018, 11:53:08 AM via Website

Gayathri Sekaran

My package name is Java_com_example_gayu_helloworld_mainfn

It's not the same as the pk name in that error message.

Download size < 0.15 MB. But also accurate enough, ad-free & free.
The minimalist app available on Play Store: https://goo.gl/ws42fN
Blog: https://okblackcafe.blogspot.com Your 5-star is appreciated.

Helpful?
Reply
Gayathri Sekaran
  • Forum posts: 9

Aug 20, 2018, 1:00:35 PM via Website

Sorry that was the error of some other project. JNIEXPORT void JNICALL Java_com_example_vinay_screenreader_MyScreenReaderService_mainfn

Helpful?
Reply
CarlineBurch
  • Forum posts: 18

Apr 5, 2019, 12:48:31 PM via Website

My package name is Java_com_example_gayu_helloworld_mainfn

Helpful?
Reply