Building Android version from source
Would anyone be able to help me compile a custom build of the Android version from the source? I need to include some extra Python modules to use in an experiment (numpy, scipy, and matplotlib), which itself seems straightforward, but I can't get even the base version of the APK built. The instructions in the setup-android.py file don't seem to work for me.
From what I understand, I need to have the PGS4A source sitting in a subfolder in the OpenSesame source folder, the name of which is specified in the setup-android.py script. I've created that by doing a git clone of the PGS4A code in GitHub. Then, it seems I have to run "android installsdk" from that folder to get the SDK installed for use.
At this point, running the setup-android.py script fails. I've tried a variety of things to attempt to get it to compile (from installing and updating more android sdk items, to even attempting to use Python for Android instead—which did make an APK (eventually), but I suspect that it didn't include the dependencies because it crashes when opening). I can detail what strategies I've attempted if it helps, but I figure it might be easier to start from this point and see if anyone can help.
The error I get at this stage is
Target id 'android-19' is not valid. Use 'android list targets' to get the target ids.
which causes the following error in turn
Buildfile: build.xml does not exist!
I'm not sure how best to move beyond these issues without causing future errors. Any help anyone could provide would be very much appreciated!
Comments
Hi,
Building the Android package is not straightforward, especially now that PGS4A is no longer maintained. But with patience and perseverance it's possible.
However, it's not possible to include numpy etc, because these are C extensions that require special compilation. (I haven't actually tried this, but I'm just assuming that it won't work.)
A more fruitful approach is probably to think of alternatives. Can you use a Windows tablet, which simply runs the regular version of OpenSesame? Or can you implement the experiment such that it doesn't require numpy?
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!