Estou executando o comando build cordova
(depois de terminar as configurações exemplificadas neste link: PhoneGap O Comando-Line Interface).
Mas os Node.js retorna este erro:
Generating config.xml from defaults for platform "android"
Preparing android project
Compiling app on platform "android" via command "cmd" /c
C:\Net\Phonegap\hello\platforms\android\cordova\build
Error: An error occurred while building the android project.Error executing "ant" debug -f "C:\Net\Phonegap\hello\platforms\android\build.xml"":
BUILD FAILED
C:\Net\templates\Phonegap\android-sdk\tools\ant\build.xml:601: The following error occurred while executing this line:
C:\Net\templates\Phonegap\android-sdk\tools\ant\build.xml:720: The following error occurred while executing this line:
C:\Net\templates\Phonegap\android-sdk\tools\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: 2 seconds
at ChildProcess. (C:\Users\myuserpc\AppData\Roaming\npm\node_modules\cordova\src\compile.js:65:22)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Socket. (child_process.js:956:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
Meu config.xml
<widget id="com.example.hello" version="0.0.1">
<name>HelloWorld</name>
<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>
<author email="[email protected]" href="http://phonegap.com">
Apache Cordova Team
</author>
<content src="index.html" />
<access origin="*" />
<preference name="Fullscreen" value="true" />
<preference name="WebViewBounce" value="true" />
<feature name="Device">
<param name="android-package" value="org.apache.cordova.device.Device" />
</feature>
</widget>
E meu AndroidManifest.xml
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" android:windowSoftInputMode="adjustPan" package="com.example.hello" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:debuggable="true" android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:configChanges="orientation|keyboardHidden|keyboard|locale" android:label="@string/app_name" android:name="HelloWorld" android:theme="@android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
</manifest>
Minha dúvida é, o que esta faltando para que o comando cordova build
funcione corretamente?
Meu Path esta configurado certo. Adicionei a variável JAVA_HOME
com o caminho correto.