分享

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

 techres 2012-02-14

    很多情况下,我们都需要去修改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.      )  

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多