androideclipse.rst 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. .. _build_androideclipse:
  2. ========================
  3. Android Eclipse Projects
  4. ========================
  5. The build system contains alpha support for generating Android Eclipse
  6. project files to aid with development.
  7. To generate Android Eclipse project files, you'll need to have a fully
  8. built and packaged tree::
  9. mach build && mach package
  10. (This is because Eclipse itself packages an APK containing
  11. ``omni.ja``, and ``omni.ja`` is only assembled during packaging.)
  12. Then, simply generate the Android Eclipse build backend::
  13. mach build-backend -b AndroidEclipse
  14. If all goes well, the path to the generated projects should be
  15. printed (currently, ``$OBJDIR/android_eclipse``).
  16. To use the generated Android Eclipse project files, you'll need to
  17. have a recent version of Eclipse (see `Tested Versions`_) with the
  18. `Eclipse ADT plugin
  19. <http://developer.android.com/tools/sdk/eclipse-adt.html>`_
  20. installed. You can then import all the projects into Eclipse using
  21. *File > Import ... > General > Existing Projects into Workspace*.
  22. Updating Project Files
  23. ======================
  24. As you pull and update the source tree, your Android Eclipse files may
  25. fall out of sync with the build configuration. The tree should still
  26. build fine from within Eclipse, but source files may be missing and in
  27. rare circumstances Eclipse's index may not have the proper build
  28. configuration.
  29. To account for this, you'll want to periodically regenerate the
  30. Android Eclipse project files. You can do this by running ``mach build
  31. && mach package && mach build-backend -b AndroidEclipse`` from the
  32. command line. It's a good idea to refresh and clean build all projects
  33. in Eclipse after doing this.
  34. In future, we'd like to include an Android Eclipse run configuration
  35. or build target that integrates updating the project files.
  36. Currently, regeneration rewrites the original project files. **If
  37. you've made any customizations to the projects, they will likely get
  38. overwritten.** We would like to improve this user experience in the
  39. future.
  40. Troubleshooting
  41. ===============
  42. If Eclipse's builder gets confused, you should always refresh and
  43. clean build all projects. If Eclipse's builder is continually
  44. confused, you can see a log of what is happening at
  45. ``$OBJDIR/android_eclipse/build.log``.
  46. If you run into memory problems executing ``dex``, you should
  47. `Increase Eclipse's memory limits <http://stackoverflow.com/a/11093228>`_.
  48. The produced Android Eclipse project files are unfortunately not
  49. portable. Please don't move them around.
  50. Structure of Android Eclipse projects
  51. =====================================
  52. The Android Eclipse backend generates several projects spanning Fennec
  53. itself and its tests. You'll mostly interact with the *Fennec* project
  54. itself.
  55. In future, we'd like to expand this documentation to include some of
  56. the technical details of how the Eclipse integration works, and how to
  57. add additional Android Eclipse projects using the ``moz.build``
  58. system.
  59. Tested Versions
  60. ===============
  61. =============== ==================================== =================
  62. OS Version Working as of
  63. =============== ==================================== =================
  64. Mac OS X Luna (Build id: 20130919-0819) February 2014
  65. Mac OS X Kepler (Build id: 20131219-0014) February 2014
  66. Mac OS X 10.8.5 Kepler (Build id: 20130919-0819) February 2014
  67. =============== ==================================== =================