Android设备监视器找不到JDK路径 [英] Android Device Monitor not found JDK Path

查看:485
本文介绍了Android设备监视器找不到JDK路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用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:


Java Runtime Environment(JRE)或Java Development Kit(JDK)
必须可用才能运行Monitor。搜索以下位置后找不到Java虚拟机

/ home / gram / Android / Sdk / tools / lib / monitor-x86_64 / jre / bin / java
当前的java路径
当我从命令行运行android studion时,设备监视器工作。

A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Monitor. No Java virtual machine was found after searching the following locations: /home/grams/Android/Sdk/tools/lib/monitor-x86_64/jre/bin/java java in your current PATH When i run the android studion from command line, the Device Monitor works.

这是.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路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆