danomatika / ofxPd

(maintained) a Pure Data addon for OpenFrameworks using libpd
Other
202 stars 45 forks source link

Problem setting up ofxPd example on Android #57

Closed cuinjune closed 7 years ago

cuinjune commented 7 years ago

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.

screen shot 2017-06-12 at 1 09 18 pm

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.

Zack

cuinjune commented 7 years ago

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.

screen shot 2017-06-12 at 6 18 13 pm

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!

cuinjune commented 7 years ago

I solved the problem thanks to Arturo from OF forum. I could successfully run ofxPd example on my Android device. Thanks!

Arturo :

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