Android Studio 3.0找不到Android Device Monitor的解决方法

Android Studio 3.0及以上版本不再内置Android Device Monitor,但通过命令行仍可使用。操作步骤包括:进入SDK的tools目录,运行'monitor'命令。如果遇到'NullPointerException',需确保无其他monitor进程运行,并删除'$HOME/.android/monitor-workspace'目录,问题即可解决。
摘要由CSDN通过智能技术生成

 

为什么Android Studio 3.0中找不到Android Device Monitor?


因为自Android Studio 3.0开始弃用Android Device Monitor,Android Developers官网上的原话是:

Android Device Monitor is a standalone tool that provides a UI for several Android app debugging and analysis tools. 
However, most components of the Android Device Monitor are deprecated in favor of updated tools available in Android Studio 3.0 and higher. The table below helps you decide which developer tools you should use.

译文:

Android设备监视器是一个独立的工具,为几个Android应用调试和分析工具提供了一个UI。 
但是,大多数Android设备监视器组件已弃用,以支持Android Studio 3.0和更高版本中提供的更新工具。下表帮助您决定应该使用哪些开发人员工具。

图1.Android Developers关于Android Device Monitor的说明页
如何在Android Studio 3.0中使用Android Device Monitor?
虽然说被“弃用”,但是不代表不支持,我们还是可以通过其他方式来使用Android Device Monitor,具体使用方式如下:

在android-sdk/tools/目录的命令行中输入以下内容:

monitor

找到SDK的路径后,打开AS的CMD,输入如下命令

1、定位到SDK目录

D:\DIDI\GovCar>cd D:\Android\sdk

2、定位到tools目录

D:\Android\sdk>cd tools

3、打开monitor

D:\Android\sdk\tools>monitor

这样就可以了。

 

但是!!!有的同学可能会报错!!!

我们打开日志看看是什么

!SESSION 2018-11-07 10:09:32.608 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_131
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=zh_CN
Command-line arguments:  -os win32 -ws win32 -arch x86 -data @noDefault

!ENTRY org.eclipse.osgi 4 0 2018-11-07 10:09:34.673
!MESSAGE Bundle reference:file:org.apache.ant_1.8.3.v201301120609/@4 not found.

!ENTRY org.eclipse.osgi 4 0 2018-11-07 10:09:34.679
!MESSAGE Bundle reference:file:org.apache.jasper.glassfish_2.2.2.v201205150955.jar@4 not found.

!ENTRY org.eclipse.osgi 4 0 2018-11-07 10:09:34.681
!MESSAGE Bundle reference:file:org.apache.lucene.core_2.9.1.v201101211721.jar@4 not found.

!ENTRY org.eclipse.osgi 4 0 2018-11-07 10:09:34.727
!MESSAGE Bundle reference:file:org.eclipse.help.base_3.6.101.v201302041200.jar@4 not found.

!ENTRY org.eclipse.osgi 4 0 2018-11-07 10:09:34.729
!MESSAGE Bundle reference:file:org.eclipse.help.ui_3.5.201.v20130108-092756.jar@4 not found.

!ENTRY org.eclipse.osgi 4 0 2018-11-07 10:09:34.730
!MESSAGE Bundle reference:file:org.eclipse.help.webapp_3.6.101.v20130116-182509.jar@4 not found.

!ENTRY org.eclipse.osgi 4 0 2018-11-07 10:09:34.732
!MESSAGE Bundle reference:file:org.eclipse.jetty.server_8.1.3.v20120522.jar@4 not found.

!ENTRY org.eclipse.osgi 4 0 2018-11-07 10:09:34.738
!MESSAGE Bundle reference:file:org.eclipse.platform.doc.user_4.2.2.v20130121-200410.jar@4 not found.

!ENTRY org.eclipse.osgi 4 0 2018-11-07 10:09:34.742
!MESSAGE Bundle reference:file:org.eclipse.team.core_3.6.100.v20120524-0627.jar@4 not found.

!ENTRY org.eclipse.osgi 4 0 2018-11-07 10:09:34.743
!MESSAGE Bundle reference:file:org.eclipse.team.ui_3.6.201.v20130125-135424.jar@4 not found.

!ENTRY org.eclipse.osgi 4 0 2018-11-07 10:09:34.746
!MESSAGE Bundle reference:file:org.eclipse.ui.cheatsheets_3.4.200.v20120521-2344.jar@4 not found.

!ENTRY org.eclipse.osgi 4 0 2018-11-07 10:09:34.749
!MESSAGE Bundle reference:file:org.eclipse.ui.intro_3.4.200.v20120521-2344.jar@4 
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值