简体   繁体   中英

What are the steps to take in order to build Android AOSP/CyanogenMod after adding a new file

Say I want to add a CustomizedAlarmManagerService class on top of what is already there in AOSP or CyanogenMod, and put it into a new package 'com.myandroid.server'.

What are the steps I need to take in order for the build to be successful?

Currently if I just add the file, reference the class somewhere, and build the whole project, I will get error "Package (com.myandroid.server) does not exist".

Thanks!

检查适当的Android.mk文件,然后将新文件添加到源列表中。

Since I lasted asked the question, there are now quite a lot of docs online detailing how Android Build system works.

For example, a blog post like this explains things pretty well.

Yes it has something to do with Android.mk file, but no, it's not just adding the files.

Basically for any new module you are creating, you need to create a new Android.mk file, give it a module name (by setting LOCAL_MODULE ), then make sure places where this module is referenced has their respective Android.mk files include the pointer to the module (eg setting LOCAL_STATIC_LIBRARIES ).

Oh, and remember the build orders in Android.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM