11

I tried run ijkplayer and I recieved this error.

  C:\ndk\ndk-build.cmd NDK_PROJECT_PATH=null 

I think is something with the build.gradle but I don't know what.

My ndk directory is on c:\ndk and I have ndk 32bit.

I appreciate your help.

Thanks.

Andrii Abramov
  • 10,019
  • 9
  • 74
  • 96
Alon
  • 2,919
  • 6
  • 27
  • 47

1 Answers1

9

Your build (gradle ?) is not passing proper path to the root of your project to ndk-build.cmd.

You can run the ndk-build.cmd from command line. Open a command prompt, cd into your module folder (it should have jni folder) , and run c:\ndk\ndk-build.cmd it will use the current path as the NDK_PROJECT_PATH

ashoke
  • 6,441
  • 2
  • 26
  • 25
  • 2
    Is there a way to tell gradle to pass the proper path to the root of the project to `ndk-build`? So it can be automatically built with the project? – Ian Letourneau Nov 10 '14 at 20:45
  • @Ianlet gradle support for ndk evolved a lot over last few updates, i suggest you use AndroidStudio to create a NDK hello-world app, and copy/create the same generated gradle options in your project. – ashoke Nov 11 '14 at 00:15
  • Thanks for your comment. I do use the AndroidStudio but I am restricted to use the NDK r8d with gradle 1.12 and I read somewhere this could cause the problem. But that's a different question from this one so I will continue to investigate on this and maybe post a new question. – Ian Letourneau Nov 12 '14 at 15:16
  • @ashoke How do you create an NDK hello-world app? Are you talking about a template? – Tenfour04 Dec 25 '14 at 03:41
  • Hello, Excuse me. After I did what as you said, I got this erro:jni/jni-helper.cpp:20:10: fatal error: 'ancillary.h' file not found... Can u help me with? Thank u. – Chinese Cat Apr 04 '18 at 02:51