ofNdkSetup Error when synching Gradle in androidEmptyExample

I am trying to run the androidEmptyExample and I am not able to run it using Android Studio.
The error I get is the following, which I have not found anything about anywhere:

> Gradle sync failed: Could not find property 'ofNdkSetup' on root project 'androidEmptyExample'.

I am using the r10e version of the ndk.

Looking for similar issues, I have found this post: Error building the androidEmptyExample [SOLVED] But it does not help.

Could you tell me what should I do in order to being able to run it?

what version of openFrameworks are you using? if you are in 0.8.4 can you try with the nightly builds? the support for android studio is still experimental but there’s some fixes in the nightly builds. be sure to check the readmes that come with the nighgiies since the installation process is slightly different

Hi Arturo, thank you for your answer.

I’ve just pulled the repository, so I believe I am using the 0.8.4 version, but how could I check and be sure?

I am really unexperienced in openFrameworks, could you tell me how to use the nightly builds? I have just copied the androidEmptyExample from of_v20150422_android_release/apps/myapps to my openframeworks folder.

When I try to build it following the Summary of the INSTALL.md file, I get the following error:

Error:(45, 0) Project with path ':ofAndroidLib' could not be found in root project 'androidEmptyExample'.
<a href="openFile">Open File</a>

if you have pulled from master then you should have the latest version the same as the nigly builds. have you followed the instructions in the readme inside the docs folder?

Yes, I am following the instructions of the file docs/android.md.

In the section “Import the project”, it says to browse to the “settings.gradle” file, but the only .gradle file in the directory “libs/openFrameworksCompiled/project/android” is build.gradle.

If I select build.gradle, I get the following error:
Error:(157, 0) Cause: make failed with exit status 2

the docs/android.md file doesn’t exist anymore is now called docs/android_studio.md:

are you sure you have pulled the latest master? if you are not very experienced with git, it might be easier to use the nightlies alone, just download the package and follow the instructions in README_ANDROID_STUDIO.md

Hi Arturo, thanks again for your answer.

I following the file docs/android_studio.md and trying to build the AndroidEmptyExample of the nightly builds. But I get the following error:

Error:(1, 0) Plugin with id 'com.android.application' not found.

What might be the cause of this error?

what version of android studio are you using? it seems they’ve released 1.4 already, the original project files were done for 1.2 and then adapted recently for 1.3 but it might be that 1.4 has brokne them again

actually i’ve just tested with android studio 1.4 and it still works fine, all i have to do is edit the paths.make file to point it to the ndk and install android studio then any of the examples work fine for me.

not sure what might be going on, in any case support for android studio is still experimental since it doesn’t have proper support for c++ development yet so we haven’t invest much time in it yet, if it doesn’t work i would try eclipse + the adt plugin following the instructions in the android_eclipse readme