Developing Matter 1.0 with nRF SDK build failes with "fatal error: jni.h: No such file or directory"

I am following the "Developing Matter 1.0 products with nRF Connect SDK" Video on YT and try to build a Matter device. I have everything already installed the SDK, VSCode etc. I was already working with it before. I updated the nRF connect SDK to be v2.3.0 and also everything else in on the latest version.

If I try to just build the plain matter sample of the light_bulb, it failes with the following error:


c:\...\modules\lib\matter\src\lib\support\JniReferences.cpp:18:10: fatal error: jni.h: No such file or directory
18 | #include <jni.h>
| ^~~~~~~

Is there something missing in my setup? where should I find this jni.h file? I assume this should be just there together with the SDK and I do not have to change anything.

Any suggestions?

Parents
  • Hi,

    I'm assuming that your issue is not related to the demo in the webinar, but just in case you see the issue when following the webinar with NCS v.2.3.0, are you seeing the same with nRF Connect SDK v2.1.1 which is the SDK version mentioned in the prerequisite section of the webinar? If you've not tested it with NCS v2.1.1 yet, I would recommend you to go back and try with this version.

    The header you mentioned is included in the SDK and the warning does not trigger on my end when building Matter samples in NCS v2.3.0, so if the issue is unrelated to the webinar, could you try the following:

    1. Navigate to the toolchain manager (open nRF Connect for Desktop -> Toolchain manager) and update the SDK and toolchain before attempting to build the Matter light bulb sample again.
       

    If this does not work, could you answer the following:

    1. Which OS are you running?
    2. Which device(s) are you building for?
      1. Are you building from command line or from the VsCode extension?
    3. Have you made any modifications to the SDK, or is the SDK instance pristine, and opened from the toolchain manager?
    4. Have you been able to build Matter samples in older instances of the SDK? For instance nRF Connect v2.2.0?
    5. Can you run "generate support information" from the extension (v2.3.0) and add the information here? 
    6. Can you paste the entire build log that results in the missing header error you pasted in the original ticket?

    Let me know about these things and I'll have a closer look to see if I can find why it is not working on your end

    Kind regards,
    Andreas

  • I tried to build with v2.2.0 and it went through 

Reply Children
No Data
Related