Recent Changes - Search:

Site.SideBar

AndroidNDKWithSDL13UsingSdltmp

Installation

  1. Install Ubuntu (new version if you want USB to work)
  2. Run updates
  3. ###sudo apt-get install ia32-libs emacs mercurial g++
  4. apt-get install ant
  5. install sdk to /opt/android/, add android exe dir to path
  6. install ndk to /opt/android/, add ndk-build, adb, emulator dirs to path
  7. Add android exe to path and run it, add platforms (7, newest, plus extras/usbdriver if avl/windows only). It looks like android-12 was used to build this back in the day.
  8. Something like:
    • export PATH=/opt/adt-bundle-linux-x86_64-20131030/sdk/tools/:/opt/adt-bundle-linux-x86_64-20131030/sdk/platform-tools/:/opt/adt-bundle-linux-x86_64-20131030/sdk/platform-tools/:/opt/android-ndk-r9c/:$PATH
    • /opt/android-ndk-r9c/toolchains/x86-4.8/prebuilt/linux-x86_64/bin/ # for i686-linux-android-gcc
  9. android-project:
    • http://www.libsdl.org/tmp/ # Download android-project.zip from here
    • unzip android-project.zip
    • cd android-project
    • edit local.properties and cfg location of the android sdk
    • android update project --target 1 --path /home/jake/projects/???/android-project
    • ndk-build
      • assembly error: change "pld" argument enclosure to brackets in "jni/jpeg/jidctfst.S"
    • ant debug # or ant debug
    • Read README in the android-project dir
    • Run "sh data.sh" to copy the data to /sdcard/data/
    • sh data.sh; ndk-build; ant debug; (ant release); scp bin/SDLActivity-debug.apk jake@www.ecse.rpi.edu:./public_html/apps/
    • Download & install the app. Holy * it works!
  10. build a c++ project using ndk and sdl:
    • (using the ndk/jni project from tmp.sdl as a starting point)
      • ./clean.sh # to remove any existing compiled libs/etc
      • rename file from .c to .cpp
      • android update project --target 1 --path /home/jake/projects/???/android-project # Not sure what this does, but can't hurt!
      • Create a 1-line file jni/Application.mk
        • APP_STL:=stlport_static
      • jni/src/Android.mk
        • ### Change to .cpp file (I also added LOCAL_CPPFLAGS but this was probly not needed)
      • ndk-build # from root project dir
        • it should rebuild all the sdl stuff, and the .cpp file and work!
Edit - History - Print - Recent Changes - Search
Page last modified on January 02, 2014, at 08:21 PM