distriqt / ANE-CustomResources

Android Custom Resources for AIR Applications
https://airnativeextensions.com
15 stars 4 forks source link

BUILD FAILED ! #7

Closed Xgamefactory closed 7 years ago

Xgamefactory commented 7 years ago

cmd java version => "1.8.0_40" after updating java to "1.8.0_111" still getting same error.

Java(TM) SE Runtime Environment (build 1.8.0_40-b26) JAVA_HOME = jdk1.7.0_05 windows 7

there is always problems with java

java info on my system

tried to setting java_home and path via bat file to jre6 but no success

@echo off
SET "JAVA_HOME=C:\Program Files (x86)\Java\jre6
SET "PATH=%JAVA_HOME%\bin;%PATH%"
java -version
pause
cmd /k ant
BUILD FAILED
.......\build.xml:42: javax.script.ScriptException: sun.org.mozilla.javascript.internal.Eva
luatorException: The choice of Java constructor replace matching JavaScript argu
ment types (function,string) is ambiguous; candidate constructors are:
    class java.lang.String replace(char,char)
    class java.lang.String replace(java.lang.CharSequence,java.lang.CharSequence
) (<Unknown source>#5) in <Unknown source> at line number 5
        at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.ja
va:220)
        at com.sun.script.javascript.RhinoScriptEngine.eval(RhinoScriptEngine.ja
va:236)
        at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
Xgamefactory commented 7 years ago

ok finally found solution.

the problem was in your build.xml

regex hast to be inside quote marks

attributes.get( "value" ).replace( "/\./g", "/" ) );

Xgamefactory commented 7 years ago

Thanks for this great tool !

if you got another problems make sure updating android sdk also if have multiple java installed on win machine you can choose what java to use with ant

example bat file

SET "JAVA_HOME=C:\PROGRAM FILES\JAVA\JDK1.7.0_05
SET "PATH=%JAVA_HOME%\bin;%PATH%"
java -version
cmd /c ant
echo finished
pause