Eclipse安装ADT和介绍DDMS

来源:互联网 发布:linux telnet ip 端口 编辑:程序博客网 时间:2024/06/02 05:34

参考网页:http://developer.android.com/sdk/installing/installing-adt.html

如果不能网络自动更新,在手动下载更新时,请注意:ADT包不要解压

Troubleshooting ADT Installation


If you are having trouble downloading the ADT plugin after following the steps above and you are behind a firewall (such as a corporate firewall), make sure that you have properly configured your proxy settings in Eclipse. In Eclipse, you can configure proxy information from the main Eclipse menu inWindow (on Mac OS X, Eclipse) >Preferences > General > Network Connections.

If you are still unable to use Eclipse to download the ADT plugin as a remote update site, you can download the ADT zip file to your local machine and manually install it:

  1. Download the ADT Plugin zip file (do not unpack it): 
  2. Start Eclipse, then select Help > Install New Software.
  3. Click Add, in the top-right corner.
  4. In the Add Repository dialog, click Archive.
  5. Select the downloaded ADT-22.6.2.zip file and click OK.
  6. Enter "ADT Plugin" for the name and click OK
  7. In the Available Software dialog, select the checkbox next to Developer Tools and clickNext.
  8. In the next window, you'll see a list of the tools to be downloaded. ClickNext.
  9. Read and accept the license agreements, then click Finish.   

    If you get a security warning saying that the authenticity or validity of the software can't be established, clickOK.

  10. When the installation completes, restart Eclipse.

To update your plugin once you've installed using the zip file, you will have to follow these steps again instead of the default update instructions.

介绍DDMS

概述

DDMS 的全称是Dalvik Debug Monitor Service,是 Android 开发环境中的Dalvik虚拟机调试监控服务。
它为我们提供例如:为测试设备截屏,针对特定的进程查看正在运行的线程以及堆信息、Logcat、广播状态信息、模拟电话呼叫、接收SMS、虚拟地理坐标等等。
在集成开发环境中,有DDMS控制台窗口。如,MyEclipse中,有个叫DDMS的Console。 
 
启动方法
这个工具存放在SDK-tools路径下,启动方法:
1) 直接双击ddms.bat运行;---如果在环境变量中配置了环境,在命令符中,直接敲入ddms,便会运行之
2) 在Eclipse调试程序的过程中启动DDMS,在Eclipse如下:
Window-Open Perspective-DDMS,点击启动就可以了
DDMS对Emulator和外接测试机同等效用,如果系统检测到它们(VM)同时运行,那么DDMS将会默认指向Emulator,以上两种启动后的操作有些不一样,建议分别尝试下;
 
工作原理
1)桥梁作用:将搭建起IDE与测试终端(Emulator或者connected device)的链接,他们应用各自独立的端口监听调试信息
2)监控作用:实时监测到测试终端的连接情况.当有新的测试终端连接后,DDMS将捕捉到终端的ID,并通过adb建立调试器,从而实现发送指令到测试终端的目的;
DDMS监听第一个终端APP进程的端口为8600,App进程将分配8601,如果有更多的终端或者更多App进程将按照这个顺序依次类推.DDMS通过8700端口接收所有终端的指令.
注:
Tip: For easy access to the SDK tools from a command line, add the location of the SDK'stools/ andplatform-tools to yourPATH environment variable.
 
eclipse碰到的问题
 
1.最近,在Eclipse中导入其他项目,总是报下面2个错误。将项目所需的jar都引入了。依然还存在这个问题。

1.The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project

2.The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files


解决办法:
1.将JRE先remove掉,然后重新引入JRE即可。(Project->properties->Java Bulid Path )
0 0
原创粉丝点击