Android Studio 실행 오류
Android Studio를 설치했으며 여기에 설명 된 모든 단계를 수행 했습니다.
그러나 시작할 studio.sh
때이 메시지에 오류가 발생했습니다.
'tools.jar'이 (가) Android Studio 클래스 경로에 없습니다. JAVA_HOME이 JRE가 아닌 JDK를 가리키는 지 확인하십시오.
여기 누구든지 이것을 도울 수 있습니까?
Java JDK가 올바르게 설치되었는지 확인하십시오.
dpkg --list | grep -i jdk
그렇지 않은 경우 JDK를 설치하십시오.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-java8-installer
설치 후 jdk를 활성화해야합니다
update-alternatives --display java
우분투가 Java JDK 8을 사용하는지 확인
java -version
모든 것이 올바르게 되었다면 답은 다음과 같아야합니다.
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
어떤 컴파일러가 사용되는지 확인
javac -version
다음과 같이 보여야합니다
javac 1.8.0_91
마지막으로 JAVA_HOME을 환경 변수에 추가하십시오.
파일의 끝에 편집 /etc/environment
하고 추가 JAVA_HOME=/usr/lib/jvm/java-8-oracle
하십시오
sudo nano /etc/environment
파일의 끝에 추가
JAVA_HOME=/usr/lib/jvm/java-8-oracle
그런 다음 다시 부팅해야합니다. 다음과 같이 터미널에서이 작업을 수행 할 수 있습니다.
sudo reboot
JDK를 제거하려는 경우
sudo apt-get remove oracle-java8-installer
sudo apt-get install default-jdk
그게 전부 우분투 11
JAVA JDK가 아닌 JAVA JRE가 설치되어 있기 때문입니다.
해결책은 간단합니다.
sudo apt-get install openjdk-7-jdk
http://www.maxmakedesign.co.uk/development/2013/android-studio-tools-jar-classpath/
오류는 설명이 필요하므로 환경 변수를 JRE 대신 JDK 경로로 설정해야합니다.
JDK_HOME: C:\Program Files\Java\jdk1.7.0_07
리눅스의 경로를 확인
여기 중복 Android Studio가 작동하지 않을 수 있습니다.
과부 7 64 비트.
- JAVA_HOME이 JRE (NO JDK) 디렉토리를 가리 킵니다.
- tools.jar를 JDK \ lib 디렉토리에서 ANDROIDSTUDIO \ lib 디렉토리로 복사하면 문제가 해결됩니다.
OpenSuSE 13.1 및 일부 13.2 버전에서는 다음을 수행해야합니다.
java-1_7_0-openjdk-devel
패키지 설치- 스튜디오를 시작할 때 JAVA_HOME 경로를 변경하십시오.
x86의 경우 : JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-1.7.0/ sh studio.sh
x64의 경우 : JAVA_HOME=/usr/lib64/jvm/java-1.7.0-openjdk-1.7.0/ sh studio.sh
새로 설치된 Linux Mint 16에서 같은 문제가 발생했습니다.이 문제를 해결하려면 command를 입력하면됩니다.
sudo apt-get install openjdk-7-jdk
And that's it. You even do not need to add repositiries or creating JAVA_HOME in your environment.
On ubuntu I have tried all the methods that are described here but none worked.
What I did in the end was to:
download JDK from oracle, extract the archive
edit
android-studio/bin/studio.sh
and add at the topexport JAVA_HOME=/path/to/jdk
save the file and
cd android-studio/bin
and launch Android Studio:./studio.sh
For me, running Fedora 22 with Gnome 16.2, this solution helped me. In short, you should install the java-1.8.0-openjdk-devel, the development files of the JDK.
Open the Terminal and search for the latest version of the JDK development package:
$ dnf search jdk-devel
Last metadata expiration check performed 12:44:51 ago on Mon Aug 3 22:20:24 2015.
============================ N/S Matched: jdk-devel ============================
java-1.8.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.8.0-openjdk-devel-debug.x86_64 : OpenJDK Development Environment with
: full debug on
$ sudo dnf install java-1.8.0-openjdk-devel
First check if the Java JDK is installed correctly:
dpkg --list | grep -i jdk
If not, install the JDK:
Download the latest version of the JDK from Oracle: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Extract it to the appropriate location in your machine. Get the extract location:
vi ~/.bashrc
orvi ~./ bash_profile
JAVA_HOME=/home/user/installs/jdk1.7.0_40 PATH=$JAVA_HOME/bin
source ~/.bashrc
orsource ~/.bash_profile
After the installation you can check it:
java -version which java
If all things are correct then the right the answer should be something like this:
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)Append the following statement to studio.sh the file in android-studio/bin directory:
JAVA_HOME=/home/user/installs/jdk1.7.0_40
Finally start your Android Studio with the following command:
./studio.sh
The problem is a bug on Fedora 20. The bug is very odd: if I have Google Talk plugin installed then Eclipse crashes (https://bugs.eclipse.org/bugs/show_bug.cgi?id=334466). It's crazy for me. I thought that was Java version and with Java 6 my eclipse was still crashing. To solve this I should use gnome/GTK instead KDE. Now it works "well" (in gnome environment). Thanks for all answers.
I was facing similar problem on Windows 7 x64 professional edition. Please note following steps to fix this problem.
tools.jar is missing from required path if you are using jdk1.7 x64 bit version.
Please install x86 version of jdk1.7
Set JDK_HOME="C:\Program Files (x86)\Java\jdk1.7.0_67" and update path environment variable as path="C:\Program Files (x86)\Java\jdk1.7.0_67\bin" Note: Linux put the proper path.
Launch 32 bit application from /android-studio\bin folder.
I tested and verified these steps on windows 7 with 32 bit jdk1.7
It's probably because you don't have jdk installed in your machine. I had exact same problem in first run. Open a terminal (CTRL+ALT+T) and type: sudo apt-get install openjdk-7-jdk
When done setup Java environment variable. Steps as follows:
sudo gedit /etc/environment
- Either in the beginning or end of the file write:
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
(location may vary depending on the installation of your Java) export JAVA_HOME
- save and exit editor.
- Load the path variable again using the terminal:
. /etc/environment
Couple of helpful links for further clarifications:
Hope this helps.
On Windows 7 just run the studio.bat file in your android-studio/bin folder with right click as an administrator. Now you get ask to import previous studio settings. Ignore this and on the next dialog you can specify the path to your jdk directory. That's all.
Marcel
I ran into this issue when I was referencing
[drive]:\Program Files\Java\jdk1.8.0_65
in my JAVA_HOME environment var instead of the Android Studio recommended
[drive]:\Program Files\Java\jdk1.7.0_79.
I am using the x64 version of the JDK on Windows 10 Pro.
From the Android Studio installation instructions.
Before you set up Android Studio, be sure you have installed JDK 6 or higher (the JRE alone is not sufficient)—JDK 7 is required when developing for Android 5.0 and higher. To check if you have JDK installed (and which version), open a terminal and type javac -version. If the JDK is not available or the version is lower than version 6, download the Java SE Development Kit 7
http://developer.android.com/sdk/installing/index.html?pkg=studio
You have 2 things you must check:
- verify that
/etc/environment
file has the correctJAVA_HOME
andPATH
values referring to your Java installation directory. - verify that you have the correct Java version (maybe you are using a distribution of Linux which need a server version of Java) you may need this version like my case JRE for server.
On my Linux Mint 17.3 install, I found these instructions incredibly helpful.
The problem seems to boil down to the system's default Java being OpenJDK and Android Studio preferring Oracle's JDK. I actually did not perform the OpenJDK removal steps given in the tutorial, but only downloaded the Oracle JDK and set it as my system's default. Android Studio worked right away.
In case the linked page ever goes away, the steps I took were
Download Oracle JDK. Mine was version 1.7.0_79.
tar -zxvf jdk-7u79-linux-x64.tar.gz
sudo mkdir -p /opt/java
sudo mv jdk1.7.0_79 /opt/java
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.7.0_79/bin/java" 1
sudo update-alternatives --set java /opt/java/jdk1.7.0_25/bin/java
and
java -version
confirms the system is using Oracle's JDK, giving output like
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)
참고URL : https://stackoverflow.com/questions/16601334/error-to-run-android-studio
'Programing' 카테고리의 다른 글
잡히지 않는 오류 : SECURITY_ERR : 쿠키를 설정하려고 할 때 DOM 예외 18 (0) | 2020.07.14 |
---|---|
안드로이드 장치에서 로그 파일을 얻는 방법은 무엇입니까? (0) | 2020.07.14 |
Java 웹 애플리케이션에 대한 Javascript 축소를 어떻게 자동화합니까? (0) | 2020.07.13 |
필드 정렬이 기본 유형인지 사용자 정의인지에 따라 구조체 정렬이 왜 달라 집니까? (0) | 2020.07.13 |
HTTP 응답 헤더에서 컨텐츠 처리 사용 (0) | 2020.07.13 |