简体   繁体   中英

Problems compiling NDK project with Android Studio 1.3 preview

Decided to give the new NDK support in Android studio a shot but seem to be running into an issue:

Error: 'std::function' has not been declared

Had a few other linking issues with stl libraries before but those were fixed by adding

stl "stlport_static" cFlags "-O2 --std=c++11 "

to the Gradle config.

Has anyone dealt with anything similar? I've been googling this the past couple of days but most answers seem out of date or not related to Android Studio 1.3.

in fact, not much has changed since around january 2014 regarding NDK support in Android Studio. The 1.3 version that is out right now is only preview 3, and the amazing NDK support that has been shown at Google I/O isn't inside it yet. It should be out soon though.

Regarding your missing std::function: did you include <functional> ? Also, the std option should be defined as -std , not --std

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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