ITeye博客

如何将自己的类build到Android.jar

marine8888 · 2011-02-07 12:13 · Android源码编译 · 移动开发 · Markdown

FROM: http://blog.csdn.net/SkyGray/archive/2010/09/01/5856146.aspx

 很多情况下,我们都需要去修改framework,如添加一些自己的类等.一些情况下可能添加类之后,我们并不需要做太多的工作这个类已经就build到Android.jar中了.但是有些时候,是需要去修改一些编译的mk文件的.

    比如当我们在/framework/base/下添加了一个/test的文件夹,里面有很多我们自己定义的类.如果想要把它build进Android.jar,供其它类使用的话,我们还要去修改

    /build/core/pathmap.mk

 

  1. #
  2. # A list of all source roots under frameworks/base, which will be
  3. # built into the android.jar.
  4. #
  5. # Note - "common" is included here, even though it is also built
  6. # into a static library (android-common) for unbundled use.  This
  7. # is so common and the other framework libraries can have mutual
  8. # interdependencies.
  9. #
  10. FRAMEWORKS_BASE_SUBDIRS := \
  11. $(addsuffix /java, \
  12. core \
  13. graphics \
  14. location \
  15. media \
  16. opengl \
  17. sax \
  18. telephony \
  19. test \
  20. wifi \
  21. vpn \
  22. keystore \
  23. )

评论(1)

  1. #1 楼 · qiaoweishu · 2011-02-28 10:54

    学习了,很受教!

评论功能维护中,当前仅展示历史评论。