机器
MacBook Air M1
操作系统
macOS Big Sur 版本 11.5.2
java版本
java版本“1.8.0_301”
Java(TM) SE 运行时环境 (build 1.8.0_301-b09)
Java HotSpot(TM) 64 位服务器 VM(内部版本 25.301-b09,混合模式)
bash_profile
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_301.jdk/Contents/Home
export PATH=$PATH:$JAVA_HOME/bin
export PATH=$PATH:$JAVA_HOME/lib
export MAVEN_HOME=/Users/XXX/Documents/apache-maven-3.8.2
export M2=$MAVEN_HOME/bin
export ANDROID_HOME=/Users/XXX/Library/Android/sdk
export PATH=$PATH:/usr/local/git/bin:/usr/local/bin:
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/build-tools
export PATH=$PATH:$ANDROID_HOME/tools/lib/x86_64
在终端上运行 uiautomatorviewer 我得到以下异常
java.lang.NullPointerException
at org.eclipse.swt.widgets.Control.internal_new_GC(Unknown Source)
at org.eclipse.swt.graphics.GC.<init>(Unknown Source)
at org.eclipse.swt.graphics.GC.<init>(Unknown Source)
at org.eclipse.swt.widgets.Tree.computeSize(Unknown Source)
at org.eclipse.swt.layout.GridData.computeSize(Unknown Source)
at org.eclipse.swt.layout.GridLayout.layout(Unknown Source)
at org.eclipse.swt.layout.GridLayout.computeSize(Unknown Source)
at org.eclipse.swt.widgets.Composite.computeSize(Unknown Source)
at org.eclipse.swt.custom.SashFormLayout.computeSize(Unknown Source)
at org.eclipse.swt.widgets.Composite.computeSize(Unknown Source)
at org.eclipse.swt.custom.SashFormLayout.computeSize(Unknown Source)
at org.eclipse.swt.widgets.Composite.computeSize(Unknown Source)
at org.eclipse.swt.layout.FillData.computeSize(Unknown Source)
at org.eclipse.swt.layout.FillLayout.computeChildSize(Unknown Source)
at org.eclipse.swt.layout.FillLayout.computeSize(Unknown Source)
at org.eclipse.swt.widgets.Composite.computeSize(Unknown Source)
at org.eclipse.swt.layout.GridData.computeSize(Unknown Source)
at org.eclipse.swt.layout.GridLayout.layout(Unknown Source)
at org.eclipse.swt.layout.GridLayout.layout(Unknown Source)
at org.eclipse.swt.widgets.Composite.updateLayout(Unknown Source)
at org.eclipse.swt.widgets.Composite.updateLayout(Unknown Source)
at org.eclipse.swt.widgets.Composite.layout(Unknown Source)
at org.eclipse.swt.widgets.Display.runSettings(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at com.android.uiautomator.UiAutomatorViewer.main(UiAutomatorViewer.java:78)
请让我知道是否有人能够遇到类似的问题并有解决方案。
谢谢,纳希德