调试framework的话,一般都是用log的方式,很麻烦且费时,如果我们可以打断点的方式来调试,那就太爽了.下面开始介绍在mac下面的方法,ubuntu也类似
1.下载asop代码.
国内有镜像,速度挺快.
hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 70g ~/android.dmg hdiutil attach ~/android.dmg.sparseimage -mountpoint /Volumes/android; cd /Volumes/android mkdir 6.0.0_r2 cd 6.0.0_r2 repo init -u git://mirrors.ustc.edu.cn/aosp/platform/manifest -b android-6.0.0_r2 repo sync2.编译
source build/envsetup.sh lunch 1 make -j4如果出现错误stat %Z的话,修改HOST_darwin-x86.mk最好一行
stat -c "%s" $(1)
3.调试
运行emulator,等待N分钟,然后把代码导入到eclipse里面,并且编译通过.然后debug java remote application就可以了.