Android.txt 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. 1. Start from readme.txt
  2. 2a. Examples folder have configured android project
  3. =================================================================================================
  4. How to build. Steps:
  5. - Install Android NDK (https://developer.android.com/tools/sdk/ndk/index.html) and set it up
  6. - Install Android SDK (https://developer.android.com/sdk/index.html) - version 16
  7. - Install apache-ant (http://ant.apache.org/bindownload.cgi)
  8. - Install JDK version 6/7
  9. - Configure environment variables properly:
  10. NDK_ROOT points to root NDK folder
  11. example: d:\android\android-ndk-r9c\
  12. ANDROID_HOME points to root Android SDK folder
  13. example: d:/android/android-sdk/
  14. JAVA_HOME points to JDK
  15. example: c:\Program Files (x86)\Java\jdk1.6.0_26\
  16. - Add necessary paths to environment variable PATH:
  17. JDK
  18. example: "c:\Program Files (x86)\Java\jdk1.6.0_26\bin\"
  19. apache-ant
  20. example: d:\android\apache-ant\bin\
  21. NDK tools
  22. example: d:\android\android-ndk-r9c\
  23. Android SDK tools and platform-tools
  24. example: d:\android\android-sdk\platform-tools\
  25. example: d:\android\android-sdk\tools\)
  26. - Copy latest source code (and don't forget to update it if you updated SDL)
  27. from SDL/android-project/src/
  28. to oxygine-framework/oxygine/SDL/android/lib/src/
  29. - Go to oxygine-framework\examples and choose any example. For example "Demo"
  30. - Try to build and run it using these scripts located in proj.android folder*:
  31. - build native part:
  32. build.cmd
  33. - build complete application in debug mode:
  34. ant_debug.bat
  35. - install it to device and run (using adb):
  36. install.bat
  37. * there is also build-run.bat includes these 3 steps
  38. !!!note!!!:
  39. Folder containing oxygine-framework should have the exact name 'oxygine-framework'
  40. not 'oxygine-framework-master' not 'oxygine-framework.git' etc.
  41. otherwise you would see error:
  42. > Android NDK: jni/src/Android.mk: Cannot find module with tag 'oxygine-framework'
  43. 2b. You could generate your own android build config.
  44. =================================================================================================
  45. - You need installed Python 2.7
  46. - You need to run this script
  47. oxygine-framework\tools\gen_template.py
  48. example:
  49. python gen_template.py MyProject -t android -d path/to/MyProject/