This is a very quick-and-dirty guide to get SDL2 up and running with CHICKEN. However, there is unfortunately currently no SDL2 egg for CHICKEN (there is a SDL1 egg but that doesn't help us here - we want SDL2 since it has official Android support and it has a nice touch API).

To debug you can use adb logcat, but note that stdout is ignored by Android! This means CHICKEN-errors may get dumped on the floor.

Hopefully, the following script-guide may be helpful. Also, if you are really brave, you could try out this similar guide.

# bootstrapping an SDL2 project
# put the official SDL tar under ~/opt/SDL2-2.0.0 or something
$ cd ~/projects
$ cp -a ~/opt/SDL2-2.0.0/android-project/ sdl2chick
$ cd sdl2chick/
$ cd jni/
$ ln -s ~/opt/SDL2-2.0.0/ SDL
$ cd ..
$ ndk-build 
# it should error with missing YourSourceHere.c. that's good!

# now, moving on to bootstrapping chicken in it:
# flush project (set sdk.dir etc)
$ android update project -p . -t android-14

# 'attach' a chicken to your android project
$ cd jni/
$ git clone -b chicken
$ cd chicken
$ make # wait forever (clones chicken-core, bootstraps and cross-compiles it)

# add the SDL2 sources
add 'System.loadLibrary("chicken");' to src/org/libsdl/app/, line 55
add 'chicken' dependency to jni/src/, line 15: 'LOCAL_SHARED_LIBRARIES := SDL2 chicken'

# add a main program:
$ cat jni/src/YourSourceHere.scm
(foreign-declare "#include <SDL.h>")
(with-output-to-file "/sdcard/sdl2-log" 
        (lambda () (print "hello world!")))

# rebuild and install:
$ cat Makefile 

	csc -t jni/src/YourSourceHere.scm # generates YourSourceHere.c as requested by ndk-build
	make -C jni/chicken libs # copies eggs/units with lib prefix (sigh ...), run this before ndk-build
	ant clean debug
	adb install -r bin/SDLActivity-debug.apk