dポイントプレゼントキャンペーン実施中!

eclipse,phonegapでandroidアプリの開発環境を作りたいんですが、ビルドすると以下の様にエラーがでてしまいます。
解決方法が解れば伝授頂けますでしょうか?ちなみにJAVA_HOMEやantのパスは通してます。

C:\phonegipproject\myapp>phonegap build android
[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] compiling Android...
[error] An error occurred while building the android project.Error executing
"ant debug -f "C:\phonegipproject\myapp\platforms\android\build.xml"":
BUILD FAILED
D:\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\too
ls\ant\build.xml:601: The following error occurred while executing this line:
D:\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\too
ls\ant\build.xml:720: The following error occurred while executing this line:
D:\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk\too
ls\ant\build.xml:734: Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK.
It is currently set to "C:\Program Files\Java\jre7"

Total time: 1 second

A 回答 (3件)

> 今度は以下のようにエラーが返されてしまいます。


エラーメッセージの全文を記載してください。
    • good
    • 0
この回答へのお礼

すいません。
何故か今日エラーが出ずに完了しました。
ありがとうございました。

お礼日時:2014/02/26 15:52

見返したら意味不明なこと書いてますな……


失礼しました。

誤:JAVA_HOMEのパスはJREではなく、JDKのインストールディレクトリに通してください。
正:環境変数JAVA_HOMEの値はJREではなく、JDKのインストールディレクトリに設定してください。

コマンドプロンプトで……の件はJAVA_HOMEとは関係ありませんね。

この回答への補足

ご返答ありがとうございます。

今度は以下のようにエラーが返されてしまいます。

[phonegap] detecting Android SDK environment...
[phonegap] using the local environment
[phonegap] compiling Android...
[error] An error occurred while building the android project.

教えていただいたページの様に設定しなおましたが・・・

ちなみに
>java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

>set JAVA_HOME
JAVA_HOME=C:\Program Files\Java\jdk1.7.0_45;

となっています。

補足日時:2014/02/22 12:38
    • good
    • 0

JAVA_HOMEのパスはJREではなく、JDKのインストールディレクトリに通してください。


http://www.javadrive.jp/install/jdk/index4.html

コマンドプロンプトで
javac -version
と打ち込んでエラーがでなければ、正常にパスが通っています。
    • good
    • 0

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!