I use external tools for the complie file, and I met this problem in my project.
I am changing the Path working directory and the problem is resolved.
step1: Settings → Tools → External Tools → NDK → my build → Working Directory
step2:
my old working directory path: $ModuleFileDir$\src\main
I change it to: $ModuleFileDir$\src\main\jni
and it works very well for me!
source share