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:
However, whenever I open one of the OF - Android example projects, I keep getting the following error:
Anything I’m missing or doing wrong?
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:
Did you do this step?
Here’s a screenshot of my
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
Clearly, I’m misunderstanding something in the instructions, or in the overall process…
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
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:
This file has been truncated.
[openFrameworks](http://openframeworks.cc/) | [Documentation table of contents](table_of_contents.md)
The Android distribution of openFrameworks is setup to work with Android Studio IDE.
Setting up openFrameworks with Android Studio is fairly straightforward. The basic steps are:
- Install latest version of [Android Studio](https://developer.android.com/studio/index.html) (Tested on version 2.2)
- Download openFrameworks 0.10.0 or later from the [download page](http://openframeworks.cc/download/) or from [github](https://github.com/openframeworks/openFrameworks/)
- Download and unzip the Android NDK version r12b: [Windows](https://dl.google.com/android/repository/android-ndk-r12b-windows-x86_64.zip), [Linux](https://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip), [OSX](https://dl.google.com/android/repository/android-ndk-r12b-darwin-x86_64.zip)
- If you got openFrameworks from git:
- run `scripts/android/download_libs.sh` to download libraries.
- Use project generator to generate Android Studio project files for android examples.
- In Android Studio, use **Open an existing Android Studio project** and select an openFrameworks example from the `examples/android` folder
- It will ask you for NDK location, input the location of NDK you downloaded. Notice: Do not select to automatically download the NDK, since the latest version might not work with openFrameworks. If you by accident select to download it automatically, click the *Project Structure* button in the toolbar in the top, and manually change the location.
- Let Android Studio download all other dependencies missing automatically
Before you can build any of the examples you have to run the Project Generator on the Example
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.
I see - that makes sense, thank you so much!
Last question (I think) - what directory should I run the
I would say
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
Weird - when I do that I get this:
MacBook-Pro-5:android nicholasarner$ cd
-bash: cd: openFrameworks/scripts/android: No such file or directory
This is what the directory looks like:
cd means change directory. you have to change in the directory where your openframeworks lies.
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
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?)
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
Thanks! I submitted a PR with the main needed changes and a couple suggestions.