My Application having native code was running perfect with previous Android Studio version. I just Updated to 3.0.1 and getting this error
/Users/salman.nazir/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/include/stdint.h
fatal error: stdint.h: No such file or directory
I checked the directory, stdint.h file is there in the mentioned path. Should i need to set something to get that file accessed?
Note: I am using MacOS
I just remove the ndk-bundle
(latest version 16) folder from the SDK folder and put there older NDK version (15c). I downloaded the previous ndk version here.
It seems to be problem with the latest NDK. So far, this is the hack for me to proceed.
The error says, that the cross-toolchain (e.g. gcc) cannot find the STL (aka libstdc++6) headers.
A closer look into Android Developer Blog reveals why.
The file in ~/Library/Android/sdk/ndk-bundle/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/include/stdint.h
redirects to a platform header and is not the actual header file.
[Edit]
- Here's how to use the new unified headers replacing the platform headers.
- And some further information about this topic.
来源:https://stackoverflow.com/questions/47416257/android-studio-3-0-1-ndk-fatal-error-stdint-h-no-such-file-or-directory