Setting up OpenFrameworks with Android Studio


#1

I’m in the process of setting up my system to deploy OpenFrameworks apps on Android devices.

I’ve followed the instructions here on macOS 10.12.3: http://openframeworks.cc/setup/android-studio/

However, whenever I open one of the OF - Android example projects, I keep getting the following error:

Anything I’m missing or doing wrong?


#2
Configure the NDK

With a text editor, edit the file libs/openFrameworksCompiled/project/android/paths.make and set the NDK path to the correct folder:

NDK_ROOT=/path/to/the/ndk

Did you do this step?


#3

Yup!

Here’s a screenshot of my paths.make file:


#4

okey then maybe use this
https://github.com/openframeworks/openFrameworks/pull/5461


#5

Hmm, I just pulled from the Master branch of OF to make sure I have those updates; but I’m still having the same issue :confused:

Clearly, I’m misunderstanding something in the instructions, or in the overall process…


#6

I had also lot’s of troubles setting the whole thing up.
The pull request is still not merged so you need to check out the specific pull request.

git fetch origin pull/5461/head:pr-android2
git checkout pr-android2
Explanation:
git fetch origin pull/ID/head:BRANCHNAME

where ID is the pull request id and branchname is the name of the new branch that you want to create. Once you have created the branch, then simply

git checkout BRANCHNAME

Next thing to do is to follow the new docs included in the pull request:

Before you can build any of the examples you have to run the Project Generator on the Example


#7

And back to your issue, the file in the folder is called paths.make and not paths.default.make
You have to open paths.default.make and save it under the new name paths.make.


#8

I see - that makes sense, thank you so much!

Last question (I think) - what directory should I run the
scripts/android/download_libs.sh
command in?

Cheers!


#9

I would say
cd openFrameworks/scripts/android&&./download_libs.sh
If you do that the libs for Macosx/linux/win are replaced. So if you want to compile for mac again you have to run
cd openFrameworks/scripts/osx&&./download_libs.sh


#10

Weird - when I do that I get this:

MacBook-Pro-5:android nicholasarner$ cd
openFrameworks/scripts/android&&./download_libs.sh

and
-bash: cd: openFrameworks/scripts/android: No such file or directory

This is what the directory looks like:


#11

cd means change directory. you have to change in the directory where your openframeworks lies.
with ls - list directory you can see where you are.

So cd (change directory) to your openframeworks folder, change to scripts/android and then run ./download_libs.sh

I don’t have a mac, but maybe you can just click on the download_libs.sh


#12

I am currently trying to set up Open Frameworks 0.10.0 for Android Studio, and ended up here trying to figure out what it means that I don’t have a paths.make file at the location indicated in the instructions on the web page at https://openframeworks.cc/setup/android-studio/ . I gather from this thread that there are new steps and that 0.10.0 doesn’t have such a file to edit, but that the web page has not yet been updated to remove that instruction?

(Is there someone to report suggested web page & doc improvements to?)


#13

you can open an issue in github at https://github.com/openframeworks/ofSite or even send a correction of that specific page by opening a PR request with the changes


#14

Thanks! I submitted a PR with the main needed changes and a couple suggestions.