Variable references empty selection: ${project_loc}

hi

I am following the android installation instructions. When I get to

  • press the play button with a toolbox or Run > External Tools > Android Install

I get a pop up saying :

Variable references empty selection: ${project_loc}

I also noticed in the console that there is a reference to arturo’s machine :slight_smile: /home/arturo/Descargas/android-ndk-r5b/

make: *** [AndroidDebug] Error 2
/home/arturo/Descargas/android-ndk-r5b/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-g++ -c -g -nostdlib --sysroot=/home/arturo/Descargas/android-ndk-r5b/platforms/android-8/arch-arm/ -fno-short-enums -I"/home/arturo/Descargas/android-ndk-r5b/platforms/android-8/arch-arm/usr/include"

is this me being to wasted after the whole day? or something wrong/missing in the instructions? most likely the first option I know… but just in case. I am thinking now that maybe I needed to replace the “project_loc” from the ${project_loc} in the instructions to form something like ${/home/r2d2/Desarrollo/android-ndk-r7b} . It is not so clear for me as I am not an expert.

??

thanks

enrike

aha, always best to do these things early in the morning… I skipped one step and did not setup the paths in the paths.make

Now I am using the github version to solve this error I was getting

undefined reference to `ofSoundShutdown()

but when I do run android install I get this below. I got latest SDK and downloaded from the manager SDK plaform 2.2. I am not sure what it means in the docs where it says “this is tested with sdk 10” , i dont find but version r16 to download

Makefile:361: warning: overriding commands for target clean' Makefile:356: warning: ignoring old commands for targetclean’
if [ -d “bin/data” ]; then \
mkdir -p res/raw; \
rm res/raw/androidemptyexampleresources.zip; \
cd bin/data; \
zip -r …/…/res/raw/androidemptyexampleresources.zip *; \
cd …/…; \
fi
if [ -f obj/ ]; then rm obj/; fi
#touch AndroidManifest.xml
/home/r2d2/Desarrollo/android-sdk-linux/tools/android update project --target android-8 --path /home/r2d2/Mahaigaina/C++/openframeworks-openFrameworks-7ca7833/apps/androidExamples/androidEmptyExample
Updated project.properties
Updated local.properties

build.xml: Failed to find version-tag string. File must be updated.
In order to not erase potential customizations, the file will not be automatically regenerated.
If no changes have been made to the file, delete it manually and run the command again.
If you have made customizations to the build process, the file must be manually updated.
It is recommended to:
* Copy current file to a safe location.
* Delete original file.
* Run command again to generate a new file.
* Port customizations to the new file, by looking at the new rules file
located at /tools/ant/build.xml
* Update file to contain
version-tag: custom
to prevent file from being rewritten automatically by the SDK tools.

Updated file /home/r2d2/Mahaigaina/C++/openframeworks-openFrameworks-7ca7833/apps/androidExamples/androidEmptyExample/proguard.cfg
ant debug
Buildfile: /home/r2d2/Mahaigaina/C++/openframeworks-openFrameworks-7ca7833/apps/androidExamples/androidEmptyExample/build.xml

BUILD FAILED
/home/r2d2/Mahaigaina/C++/openframeworks-openFrameworks-7ca7833/apps/androidExamples/androidEmptyExample/build.xml:82:

Error. You are using an obsolete build.xml
You need to delete it and regenerate it using
android update project

Total time: 0 seconds
make: *** [AndroidInstall] Error 1

I recently updated the documentation for building on Android. I got it working for Ubuntu and OS X 10.6, with the newest Android SDK (16) and a slightly older NDK (r6).

“Variable references empty selection” means you don’t have any particular project selected in Project Explorer when you ran the Android Install command. It should go away if you select immediately before running the command.

You will need to replace build.xml for both the example project and for the ofAndroidLib project. It’s enough to just delete the old one and do ‘android update project -p .’ when you’re inside the directory.

thanks, I removed all build.xml from the examples and run ‘android update project -p .’ in each of the directories and also pointed the path to the latest r7b NDK. They I got another error saying that OF/addons/ofxAndroid/ofAndroidLib/build.xml was wrong. I noticed the file did not exist so I run again the android update in that dir, and now I can compile properly!
BUILD SUCCESSFUL

I get another error but I believe this might be a problem with space in my device, so thats another topic I guess :slight_smile:

Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]