Problem setting up ofxPd example on Android

Hi, I’m trying to run ofxPd example on Android devices using Android Studio on OSX.

First of all, I could successfully compile and run of_v0.9.8_android_release/examples/android/androidEmptyExample on Android Studio.

But I wasn’t sure how to properly add ofxPd addon on top of the androidEmptyExample.
So I just tried locating ofxPd folder into androidEmptyExample/src but when I build it, It fails with the errors as you can see in the screenshot below.

I thought it has to do with C Flags so I added them on androidEmptyExample/jni/Android.mk file but it doesn’t seem to have any effect.
How can I properly add C Flags on Android Studio?
Many thanks!

UPDATE : I removed ofxPd folder in of_v0.9.8_android_release/examples/android/androidEmptyExample and I added ‘ofxPd’ at the end of androidEmptyExample/addons.make file instead.

When I build it, now it always gets stuck in the middle of the build.


It gets stuck while compiling one of C files in ofxPd/libs/libpd/pure-data/src folder.
I tried this many times but it never progressed further once it gets stuck.
(Once I’ve waited for over 40 minutes but no progress at all)

The result was the same regardless of the C Flags.
I would appreciate any suggestion. Thanks!

i remember having this same problem with android studio, try running make from a console using:

make PLATFORM_OS=Android Debug

once it’s built android studio shouldn’t need to rebuild it and the next time you change something it will only need to build that file and hopefully won’t get stuck

1 Like

That fixed my problem.
I could successfully run ofxPd example on my Android device.
Thank you very much @arturo you really saved me. :slight_smile: