在Android4.4的代码中,发现一个有意思的东西,在developers这个目录下有个samples目录,这个目录是随着源代码一起download下来的demo,可以从这些demo中学习到很多东西,学习的基础就是这些官方demo。
这个官方网站的samples网址下对应的实例就是这个目录下的文件,所以,如果你想测试一下,就把这些文件拷贝到你的编译环境中好了。
还有一个地方,也是官方的实例代码:
1.在development->apps: 这下面也有很多例子,因为有Android.mk文件,所以可以直接mm编译,然后直接install即可,像这个:
Install: out/target/product/flo/data/app/NinePatchLab.apk
2.在developerment->ndk:这下面有jni的例子,可以作为参考,我们最熟悉的hello-jni就在这里了