简体   繁体   English

UI Automator Viewer 的 GUI 损坏

[英]UI Automator Viewer's GUI Broken

The problem问题

The whole GUI is broken.整个 GUI 都坏了。 No messages, no texts in the buttons, weird symbols, etc.没有消息,按钮中没有文字,奇怪的符号等。
I think it might be the SWT (see image) .我认为它可能是 SWT (见图)

Environment环境

  • Desktop OS: macOS Catalina 10.15.4 (19E287)桌面操作系统:macOS Catalina 10.15.4 (19E287)

  • Mobile platform/version under test: Android移动平台/被测版本:Android

  • Real device or emulator/simulator: Emulated device via Android Studio QEMU真实设备或模拟器/模拟器:通过 Android Studio QEMU 模拟设备

  • Java: Installed Java with brew. Java:安装 Java 与 brew。

    openjdk version "1.8.0_252" openjdk 版本“1.8.0_252”
    OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_252-b09) OpenJDK 运行时环境 (AdoptOpenJDK)(build 1.8.0_252-b09)
    OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.252-b09, mixed mode) OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.252-b09,混合模式)

  • Android Studio Installed from official webpage. Android Studio 从官网安装。

    Android Studio 4.0 Android Studio 4.0
    Build #AI-193.6911.18.40.6514223, built on May 20, 2020构建 #AI-193.6911.18.40.6514223,构建于 2020 年 5 月 20 日
    Runtime version: 1.8.0_242-release-1644-b3-6222593 x86_64运行时版本:1.8.0_242-release-1644-b3-6222593 x86_64
    VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o虚拟机:JetBrains s.r.o 的 OpenJDK 64 位服务器虚拟机
    macOS 10.15.4 macOS 10.15.4
    GC: ParNew, ConcurrentMarkSweep GC:ParNew、ConcurrentMarkSweep
    Memory: 1237M Memory:1237M
    Cores: 12核心数:12
    Registry: ide.new.welcome.screen.force=true注册表:ide.new.welcome.screen.force=true
    Non-Bundled Plugins:非捆绑插件:

Steps to reproduce重现步骤

  1. Install Java 8安装 Java 8
  2. Install Android Studio安装 Android Studio
  3. Install Intel HAXM安装英特尔 HAXM
  4. Run from terminal uiautomatorviewer or /Users/user/Library/Android/sdk/tools/bin/uiautomatorviewer从终端uiautomatorviewer/Users/user/Library/Android/sdk/tools/bin/uiautomatorviewer

Enviroment variables环境变量

export JAVA_HOME_8=$(/usr/libexec/java_home -v 1.8)

export JAVA_HOME=$JAVA_HOME_8
export PATH=$PATH:$JAVA_HOME/bin

export M2_HOME=/opt/apache-maven-3.6.3
export PATH=$PATH:$M2_HOME/bin

export ANDROID_HOME=/Users/user/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/build-tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin

Maybe I'm missing something.也许我错过了一些东西。 Also, if logs are needed please tell me.另外,如果需要日志,请告诉我。
Thanks谢谢

If you are using dark mode, can you try switching your macOS theme to light mode?如果您使用的是深色模式,您可以尝试将 macOS 主题切换为浅色模式吗? I got a Java update dialog which looked similar to your screenshot.我得到了一个 Java 更新对话框,看起来与您的屏幕截图相似。 I realized the texts were there but they were white and couldn't be seen over a white window background.我意识到文本在那里,但它们是白色的,在白色的 window 背景上看不到。 I realized this when I clicked on a button.当我点击一个按钮时,我意识到了这一点。

Java 更新对话框

You must change to Light mode appearance in your Mac setting您必须在 Mac 设置中更改为 Light 模式外观

I had the same problem.我有同样的问题。 I was able to fix it by switching from adoptopenjdk to using Java 1.8.0_231.我能够通过从采用openjdk切换到使用Java 1.8.0_231来修复它。 Could be that the problem is the different GUI they use in adoptopenjdk vs oracle.可能是问题在于他们在采用openjdk 与 oracle 中使用的 GUI 不同。 From adoptopenjdk FAQ "For JDK8, AdoptOpenJDK is using an open-source renderer called Pisces. " Hope that helps.来自采用openjdk 常见问题解答“对于 JDK8,AdoptOpenJDK 正在使用一个名为 Pisces 的开源渲染器。”希望对您有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM