Can't compile project in Eclipse (buildpath error). (OS X 10.9)

I am using the r8d NDK, have set up the path for it and the sdk.
After importing all the projects, according to the documentation I got the red exclamation marks. Had to change the target.

However, I can’t build the main project or any examples:

**** Build of configuration Android for project openFrameworks ****

make -C ../openFrameworksCompiled/project all PLATFORM_OS=Android 
../../../libs/openFrameworksCompiled/project/android/config.android.default.mk:32: ../../../libs/openFrameworksCompiled/project/android/paths.make: No such file or directory
make: *** No rule to make target `../../../libs/openFrameworksCompiled/project/android/paths.make'.  Stop.

**** Build Finished ****

So I looked at the /libs/openFrameworksCompiled/project/android/paths.make.
It is named paths.make.default. I renamed it to paths.make.
Afterwards I seemed to be able to build the main project and other projects.

But I still get error messages:

The containter 'Android Dependencies' references non existing library [...]/addons/ofxAndroid/ofAndroidLib/bin/ofandroidlib.jar

any idea?

thanks!

Do you import openFrameworks in this order?:

  1. openFrameworks/libs
  2. openFrameworks/libs/openFrameworks
  3. openFrameworks/addons/ofxAndroid/ofAndroidLib
  4. openFrameworks/examples/android

I did. I imported each one after another as stated here: http://www.openframeworks.cc/setup/android-eclipse/

So if you can not compile ofAndroidLib, you should have some error messages about it on the console. Don’t you have any?

I can’t compile the examples. ofAndroidLib did not return any errors as far as i realize.

nylki, does ofandroidlib.jar file exist under […]/addons/ofxAndroid/ofAndroidLib/bin/ directory? Or is it not created at all?

@nylki take a look at the install guide again, this is explained there, the paths.make file has to be modified to point to the correct paths.

And the errors you are seeing is because you have a different default android target, you need to open the properties of the project and in the android section select the correct target again.

Also sometimes eclipse doesn’t remove correctly old errors, mostly when you’ve just imported the projects, you just need to select all the errors and delete them.

All of it is explained in the setup guide

hmm, as a matter of fact it does not exist at that directory. But after deleting the (probably older) error messages, as arturo suggested, I did not get the same error.

I did change the paths.make.
I also set the target in the properties to Android 4.1.2 and for testing also to Android 4.4.
That was not the cause it seems.

Thats it! Now I was able to continue. However, I get new errors yay:

Have you got ideas on these?
Posibly the missing ofandroidlib.jar, would I need to copy it to the mentioned directory? And how could that even happen?

thank you both so far!

sometimes the first time you import the projects you need to restart eclipse and then it’ll compile everything correctly, also keep deleting the errors. sorry it’s so weird but eclipse doesn’t handle very well importing already created projects with dependencies

Thanks arturo.
Eclipse is quite frustrating at the moment. Now those errors are gone, but it complains about missing AndroidManifest.xml, although it exists in the projects folders. How could I fix that? Cleaning and deleting errors doesnt fix this.

Isn’t there a nicer alternative than using eclipse? Maybe compiling from commandline?

those errors don’t seem like an eclipse bug anymore, can you try removing everything from the workspace but ofAndroidLib, openFrameworks and androidEmptyExample

Alright, that helped!. I removed all of them. But kept libs, ofAndroidLib, openFrameworks and the androidEmptyExample.

I was able to compile and launch it on my android device!
I imported the camera example, and that one works too. However Vibrator example don’t work. (complains about not being able to import data). The openCVFace example didnt draw a rectangle around a face :confused:
Also I had visual glitches with the apps, when the phone got locked and I unlocked the device again.

However, I guess it’s good for me now. I’ll code the stuff I wanted to and will try to compile.

the problem with pausing the app and resuming it again is a known problem in 0.8.0, it’s fixed in the latest version from github

1 Like