Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Won't Fix
-
3.4.0, 3.5.0
-
None
-
None
-
Windows
Description
"$ cordova build" exists with:
-pre-compile: [echo] Set jars path to: C:\ant-build\phonegap\test3\hello\platforms\android\CordovaLib\ant-build\classes.jar -compile: [javac] Compiling 3 source files to C:\bin\phonegap\test3\hello\platforms\android\ant-build\classes [javac] C:\bin\phonegap\test3\hello\platforms\android\src\com\example\hello\HelloWorld.java:23: error: package org.apache.cordova does not exist [javac] import org.apache.cordova.*; [javac] ^ [javac] C:\bin\phonegap\test3\hello\platforms\android\src\com\example\hello\HelloWorld.java:25: error: cannot find symbol [javac] public class HelloWorld extends CordovaActivity [javac] ^ <...>
Reason:
bin/templates/project/custom_rules.xml:
.... <pathconvert property="fixedJarsPath" refid="project.all.jars.path"> <filtermapper> ***** <replacestring from="/bin/" to="/ant-build/"/> ***** <replacestring from="\bin\" to="\ant-build\"/> </filtermapper> </pathconvert> <path id="project.all.jars.path"> <pathelement path="${fixedJarsPath}"/> </path> <echo message="Set jars path to: ${toString:project.all.jars.path}"/> ....
Fix:
The replace string is just to basic. There should be a file-path exists check or a correct error message should be shown during build process.
Best Regards
Tobias