Android-studio file not found <boost/filesystem.hpp>

Hi there,

have a problem compiling any android app from the master branch on Ubuntu 16.04.

When gradle builds the project on Android Studio, I get the following error:

Error:Note: /home/osboxes/openFrameworks/addons/ofxAndroid/ofAndroidLib/src/cc/openframeworks/OFAndroidVideoGrabber.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
In file included from /home/osboxes/openFrameworks/libs/openFrameworks/gl/ofBufferObject.cpp:4:
In file included from /home/osboxes/openFrameworks/libs/openFrameworks/graphics/ofPixels.h:6:
In file included from /home/osboxes/openFrameworks/libs/openFrameworks/utils/ofLog.h:4:
/home/osboxes/openFrameworks/libs/openFrameworks/utils/ofFileUtils.h:20:11: fatal error: 'boost/filesystem.hpp' file not found # include <boost/filesystem.hpp>

I thought it was a problem of configuration on my machine, so I took a clean VM image and tried again: same result. install_dependencies.sh was executed beforehand and I can see my /usr/include/boost/filesystem.hpp.

Posted this on GitHub and Arturo referred to me to INSTALL_FROM_GITHUB.md, which I already followed to a T to no avail.

Any help is greatly appreciated.

have you run download_libs as explained in that document?

Yes, I did.

If I run it I get the following:

~/openFrameworks/scripts/linux$ ./download_libs.sh
Downloading openFrameworksLibs_master_linux64gcc5.tar.bz2
–2018-01-26 12:36:05-- http://ci.openframeworks.cc/libs/openFrameworksLibs_master_linux64gcc5.tar.bz2
Resolving ci.openframeworks.cc (ci.openframeworks.cc)… 198.61.170.130
Connecting to ci.openframeworks.cc (ci.openframeworks.cc)|198.61.170.130|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 6074786 (5.8M) [application/octet-stream]
Saving to: ‘openFrameworksLibs_master_linux64gcc5.tar.bz2’

openFrameworksLibs_master_linux64gcc5.tar.bz2 100%[===============================================================================================================>] 5.79M 2.03MB/s in 2.9s

2018-01-26 12:36:08 (2.03 MB/s) - ‘openFrameworksLibs_master_linux64gcc5.tar.bz2’ saved [6074786/6074786]

Removing old libraries
Uncompressing libraries linux64gcc5 from openFrameworksLibs_master_linux64gcc5.tar.bz2
Copying libxml2 to ofxSvg
Removing old opencv libraries
Copying svgtiny to ofxSvg
Removing old opencv libraries
Copying poco to ofxPoco
Removing old opencv libraries

And that’s it. In order for this to be relevant, I’d expect openFrameworksLibs_master_linux64gcc5.tar.bz2 to contain libboost’s headers, but instead it only comes with fmodex, glm, json, kiss, libxml2, poco, svgtiny, tess2 and utf8.

you need to download the libraries for android too:

scripts/android/download_libs.sh -n

-n tells the script to not overwrite previous libraries so you can work with more than one platform

Thanks that worked.