Error undefined reference to std::__ndk1 after update ndk revision 11

Viewed 5077

undefined reference to 'webrtc::CreateSessionDescription(std::__ndk1::basic_string, std::__ndk1::allocator > const&, std::__ndk1::basic_string, std::__ndk1::allocator > const&, webrtc::SdpParseError*)'

After updating android ndk revision 11, I get some problems. I could not build my project because of above it.

In Android Developer, I found that 'Changed libc++’s inline namespace to std::__ndk1 to prevent ODR issues with platform libc++.', but I cannot understand.

How can I fix it?

Thanks for helping me.

2 Answers

I had the error undefined reference to 'std::ndk 1::cout'

I fixed it by changing my gradle file to this:

externalNativeBuild {
    cmake {
        cppFlags "-DANDROID_STL=c++_shared"
    }
}
Related