如何将自己的类build到Android.jar
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
- #
- # A list of all source roots under frameworks/base, which will be
- # built into the android.jar.
- #
- # Note - "common" is included here, even though it is also built
- # into a static library (android-common) for unbundled use. This
- # is so common and the other framework libraries can have mutual
- # interdependencies.
- #
- FRAMEWORKS_BASE_SUBDIRS := \
- $(addsuffix /java, \
- core \
- graphics \
- location \
- media \
- opengl \
- sax \
- telephony \
- test \
- wifi \
- vpn \
- keystore \
- )
学习了,很受教!