问题描述
我已经下载了日历
应用程序从和所有它依赖像(的DateTimePicker,ColorPicker的...),我试图启动应用程序,就好像它是一个Android项目,但像发生在画面中的那些
的问题
我想问问,希望这将是清楚的是:
是否有一种方法来调试在Android源$ C $ C包中发现的应用程序?
我试图整合应用程序的部分,但首先我要了解它是如何构造的挑它的一些code部分和XML设计。
可以编译通过Eclipse应用程序,但是,它是复杂的,因为每个应用程序需要一个广告鹰派的做法。我preFER有我的整个AOSP版本code导入到Eclipse,然后调试code是容易多了。
首先,你需要添加你的整个平台code:
这里有一个充分的解释:
基本上,这就是你需要:结果
1)文件 - >新建 - >项目 - > Java项目,结果
2)取消选中使用默认位置结果
3)选择您的整个AOSP构建结果的位置
4)preSS下(这将需要几分钟的时间)
现在要在Eclipse中远程调试应用程序:
1)运行 - >调试配置...结果
2)在右侧搜索点击远程Java应用程序
3)preSS新建结果
4)选择一个名字(任意名字都行)结果
5)选择项目:选择你的AOSP项目结果
6)使用端口8700结果
7)preSS应用
现在可以调试在AOSP任何应用程序(包括AOSP本身):
1)在日历程序(例如DDMS视图preSS)结果
2)运行 - >调试Condigurations ...->选择您所创建的新的远程Java应用程序和preSS申请结果
3)一个错误框将显示:在工作区中的错误,但你可以忽略它(preSS继续)结果
4)进入Debug视图,并添加您需要任何断点
这就是它...
如果你需要在其的onCreate
阶段来调试应用程序,那么你需要去:结果
设置APP->开发人员选项 - >选择调试应用程序(选择您的应用程序)
并勾选为WAIIT调试器
I have downloaded the Calendar
Application From android.googlesource.com and all it dependencies like (datetimepicker, colorpicker...), I am trying to launch the application as if it is an android project, but several errors occurred like the ones in the picture
The Question
I am trying to ask and hope it would be clear is:
Is there is a way to debug the apps found in the android source code packages ?
I am trying to integrate parts of the application but first I should understand how it was constructed to pick some code portions and xml designs of it.
It is possible to compile the app via Eclipse, however, it's complicated because each app requires an ad hawk approach. I prefer to have my entire AOSP build code imported to Eclipse and then debugging the code is much easier.
First, you need to add your entire platform code:You have a full explanation here: http://source.android.com/source/using-eclipse.html
Basically this is what you need:
1) File->New->Project->Java Project
2) Uncheck "Use default location"
3) Choose the location of your entire AOSP build
4) Press Next (this will take several minutes)
Now you want to remote-debug apps in Eclipse:1) Run->Debug configurations...
2) Click on "Remote Java Application" on the right side
3) Press "New"
4) Pick a name (any name will do)
5) Choose the project: pick your AOSP project
6) Use port 8700
7) Press Apply
Now you can debug any application in your AOSP (including the AOSP itself):1) in DDMS view press on the Calendar process (for example)
2) Run->Debug Condigurations...-> Choose the new Remote Java Application you created and press apply
3) An error box will appear: "Errors in workspace", but you can ignore it (press "Proceed")
4) Go to Debug view and add any breakpoints you need
That's it...If you need to debug the app during its onCreate
phase then you need to go to:
Settings app-> Developer Options-> Select debug app (choose your app)and check "Waiit for debugger"
这篇关于如何调试Android源日历应用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!