Closed kebbbnnn closed 5 years ago
I think our README doesn't account for changes to Android Studio since this was written. A couple of questions:
externalNativeBuild {
cmake {
cppFlags "-frtti -fexceptions"
arguments "-DANDROID_APP=1 -DANDROID=1 -DANDROID_STL=c++_shared -DANDROID_TOOLCHAIN=clang++"
}
@drubinstein Thanks for responding :)
(1) I just follow through the steps in creating ndk project in the Android Studio project wizard that creates a simple hello world project which pretty similar to that tutorial
(2) I added to the gradle script but still it produce same error :(
Meanwhile, after looking deeper into the error logs (even though I didn't understand most of it) I noticed that clang's complaints are pointing to nlohmann::json
. I looked into the repo of the lib and thought that this might be an issue in retrieving string from the json object so I followed the example in the repo https://github.com/nlohmann/json#serialization--deserialization and came up to these changes in RequestImplementation.cpp
and ResponseImplementation.cpp
:
and the build errors are gone! :)
If you want to put those changes in a PR I'll okay them.
@drubinstein I submitted a PR. This is my onboarding project to NDK and relearning C++. Looking forward to contribute more soon. Cheers! :)
Fixed by #19
Hi, I'm new to ndk. I tried to add the lib in my android ndk project, it's just a simple hello world project just for testing the NFHTTP lib in android, but I'm having these errors when I try to build the project
Any idea how to fix these build errors?
info of my setup:
OS: macOS Mojave v10.14.1 Android Studio: Android Studio 3.3.2 NDK: 19.2.5345600 Clang: Apple LLVM version 10.0.0 (clang-1000.11.45.5)