忆秦娥箫声咽的注释:【转】如何将自己的类build到Android.jar

来源:百度文库 编辑:偶看新闻 时间:2024/04/26 01:07:25

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

分类: Android积累 2010-09-01 17:33 385人阅读 评论(3) 收藏 举报

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

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

    /build/core/pathmap.mk

 

  

[java] view plaincopyprint?
  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.      )  

分享到: