试图与离子构建失败,Android模拟器.."找不到类:javac1.8" [英] Trying to build Android Emulator with ionic fails.. "Class not found: javac1.8"
问题描述
我想效仿的Android使用离子型框架的离子的emulate Android的命令。
I'm trying to emulate android using ionic framework's "ionic emulate android" command.
但是,它抛出一个异常。
But it throws an exception..
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
BUILD FAILED
C:\adt-bundle-windows-x86-20131030\sdk\tools\ant\build.xml:601: The following er
ror occurred while executing this line:
C:\adt-bundle-windows-x86-20131030\sdk\tools\ant\build.xml:720: The following er
ror occurred while executing this line:
C:\adt-bundle-windows-x86-20131030\sdk\tools\ant\build.xml:734: Class not found:
javac1.8
Total time: 1 second
C:\PhoneApps2\myApp2\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,C:\PhoneApps2\myApp2
\platforms\android\build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: cmd: Command failed with exit code 8
at ChildProcess.whenDone (C:\Users\Colin\AppData\Roaming\npm\node_modules\co
rdova\src\superspawn.js:112:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:730:16)
at Process.ChildProcess._handle.onexit (child_process.js:797:5)
Unable to emulate app on platform android. Please see console for more info.
我有JRE和JDK的安装了最新版本。在我的系统变量;
I have the latest versions of JRE and JDK installed.. in my System Variables;
JRE_HOME: C:\Program Files (x86)\Java\jre8
JAVA_HOME: C:\Program Files (x86)\Java\jdk1.8.0
ANT_HOME: C:\Users\Colin\AppData\Roaming\npm\node_modules\ant\ant
PATH: ...;%ANT_HOME%\bin;%PATH%\tools;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;%JAVA_HOME%\bin;%JRE_HOME%\bin
任何人是否有一个线索,这可能会造成这个问题?谢谢
Does anybody have a clue as to what could be causing this issue? Thank you
推荐答案
目前的主要问题是,蚂蚁< 1.9.0不支持Java 8.见接受的答案在这里:
Eclipse和蚂蚁:javac1.8类未找到
The main issue is that ant < 1.9.0 does not support Java 8. See the accepted answer here:
Eclipse and Ant: javac1.8 class not found
如果它的不方便改变蚂蚁所使用的版本,使用Java 6或7将工作。
If it's inconvenient to change the version of ant used, using Java 6 or 7 will work.
这篇关于试图与离子构建失败,Android模拟器..&QUOT;找不到类:javac1.8&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!