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

  • Replies:5
  • OpenNot stickiedUnanswered
  • 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
  • Forum posts: 1,085

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

An ad-free & full-free app available on Google Play - https://goo.gl/ws42fN
A 5-star for the PURE app, please. Download size < 0.07 MB. Thank you.

Helpful?
Reply
  • Forum posts: 9

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

My package name is Java_com_example_gayu_helloworld_mainfn

Helpful?
Reply
  • Forum posts: 1,085

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.

An ad-free & full-free app available on Google Play - https://goo.gl/ws42fN
A 5-star for the PURE app, please. Download size < 0.07 MB. Thank you.

Helpful?
Reply
  • 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
  • Forum posts: 18

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

My package name is Java_com_example_gayu_helloworld_mainfn

Helpful?
Reply