问题描述
我正在使用Arch Linux与Gnome。
I'm using Arch Linux with Gnome.
我通过桌面项打开Android Studio。代码编辑器工作正常,设备管理器正常启动,应用程序像魅力一样运行,但当我尝试打开设备监视器时,我收到此错误:
I open Android Studio by the desktop item. The code editor works fine, the device manager starts correctly and the app run like a charm, but when I try to open the Device Monitor, I get this error:
这是.desktop内容
Here is the .desktop content
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Icon[en_US]=/home/grams/android-studio/bin/studio.png
Name[en_US]=Android Studio
Exec=/home/grams/android-studio/bin/studio.sh
Comment[en_US]=Android Studio IDE
Name=Android Studio
Comment=Android Studio IDE
Icon=/home/grams/android-studio/bin/studio.png
我的JRE和JDK变量正在/ etc / profile上添加。
当我在命令行上运行Android Studio时,不会发生此错误。也许这是Gnome启动器的一个问题?
My JRE and JDK variables are being added on /etc/profile.When i run Android Studio on the command line, this error not occurs. Maybe it is a problem with Gnome launcher ?
推荐答案
最新的Android Studio Bundle带有自己的JRE(在< ANDROID_STUDIO> / jre 这是推荐使用的JRE(查看文件/项目结构/ SDK位置)。
Newest Android Studio Bundle comes with its own JRE (under <ANDROID_STUDIO>/jre
and this is the recommended JRE to work with (look at File / Project Structure / SDK Location).
同样,一个简单的选择是在监视工具下创建一个符号链接,以使JRE与Android Studio保持一致甚至获得更新。
Likewise, a simple option is to create a symbolic link under the monitor tools to keep JRE in line with Android Studio even getting an update.
对于MAC或Linux:
For MAC or Linux:
#ln -s <ANDROID_STUDIO>/jre <SDK>/tools/lib/monitor-x86_64/jre
32位:
#ln -s <ANDROID_STUDIO>/jre <SDK>/tools/lib/monitor-x86/jre
然后ddms监视器适用于两种方式:从Studio IDE(工具/ Android / ADM)或命令行(< SDK> tools /./ monitor
)
Then the ddms monitor works for both ways: from Studio IDE (Tools / Android / ADM) or command line (<SDK>tools/./monitor
)
这篇关于Android设备监视器找不到JDK路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!