The import org.apache.cordova cannot be resolved

后端 未结 7 489
花落未央
花落未央 2020-12-08 15:05

For some reason, after going through Phonegap\'s non-inclusive instructions (it doesn\'t even mention setting up ANT, or the headaches with Ant and JDK), this doesn\'t work

7条回答
  •  青春惊慌失措
    2020-12-08 15:53

    I initially got around this using one of the solutions posted above: about downloading the phonegap from github and pasting in the cordova-2.2.0.jar and cordova-2.2.0.js files into the generated directories.

    After fiddling around with the path and environment variables these files are already in place (project/libs/cordova-2.2.0.jar and project/assets/www/cordova-2.2.0.js) now for me after running the "create" command on command line.

    I am using the ANT that came bundled with Eclipse so my PATH variable includes:

    C:\Program Files\Eclipse\plugins\org.apache.ant_1.8.3.v20120321-1730\bin;

    and I added an environment variable for ANT_HOME of: C:\Program Files\Eclipse\plugins\org.apache.ant_1.8.3.v20120321-1730

    I tested adding \bin or removing it to both the PATH and environment variable for ANT_HOME and this was the winning combination.

提交回复
热议问题