简体   繁体   English

Android Studio 3.5.1 和 NDK 20.0 找不到 cstdint

[英]Android Studio 3.5.1 with NDK 20.0 can't find cstdint

How do I get a cpp file in my project to find the header cstdint?如何在我的项目中获取 cpp 文件以查找 header cstdint?

The problem was that I had to add my source files to the add_library method in CMakeList.txt.问题是我必须将我的源文件添加到 CMakeList.txt 中的 add_library 方法中。

Also, I added arguments "-DANDROID_STL=c++_shared" to the android.defaultConfig.externalNativeBuild.cmake method in the build.gradle for Module.app. Also, I added arguments "-DANDROID_STL=c++_shared" to the android.defaultConfig.externalNativeBuild.cmake method in the build.gradle for Module.app. I think this is the default behavior and isn't necessary though.我认为这是默认行为,但不是必需的。

I made the mistake of assuming the source files were added to CMakeList.txt automatically.我错误地假设源文件已自动添加到 CMakeList.txt 中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM