I have a legacy app that a fellow developer was seeing fcntl(): Bad file descriptor
when building our native cpp code within AndroidStudio.
Our build environment supports building from the command line (for scripting and doing daily automatic builds) using locally installed NDK as well as through AndroidStudio. We set local.properties
to point to the locally installed NDK.
I could not determine the cause of the fcntl
error and was not seeing it myself when running NDK r17. I then updated to NDK r21d (June 2020) and immediately see the same thing within AndroidStudio.
fcntl(): Bad file descriptor
[arm64-v8a] Compile++ : vhc_jnilib <= Png.cc
fcntl(): Bad file descriptor
[arm64-v8a] Compile++ : vhc_jnilib <= Jpeg.cc
fcntl(): Bad file descriptor
[arm64-v8a] Compile++ : vhc_jnilib <= MyContainer.cc
fcntl(): Bad file descriptor
[arm64-v8a] Compile++ : vhc_jnilib <= aIdentityInfo.cc
fcntl(): Bad file descriptor
[arm64-v8a] Compile++ : vhc_jnilib <= UpdateImage.cc
fcntl(): Bad file descriptor
Android Studio 4.0, MacOS Catalina 10.15.4, Gradle 6
Questions:
The project path cannot have spaces.
I have encountered the same problem, when I removed the spaces in the project path, the problem was solved.
I was having the same issue. I'm not sure what was the actual cause of it, but I got it fixed by deleting .gradle
, .cxx
& build
directories and then rebuilding the project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With