grunt-phonegap
grunt-phonegap copied to clipboard
grunt phonegap:build places platforms and plugins in wrong directories
When running this command it adds the plugins and platforms to:
<project-root>/plugins
<project-platform>/plugins
not to
<project-root>/<config:path>/plugins
<project-root>/<config:path>/plugins
This causes the "phonegap build" step to fail with: Fatal error: Unable to read "phonegap/platforms/android/AndroidManifest.xml" file (Error code: ENOENT).
However, the file is present at "platforms/android/AndroidManifest.xml".
Relevant version info: [email protected] [email protected] [email protected] [email protected] [email protected]
grunt.initConfig({
phonegap: {
config: {
path: 'phonegap',
plugins: ['org.apache.cordova.console', 'org.apache.cordova.device', 'org.apache.cordova.statusbar'],
platforms: ['android'],
}
}
});
I have encountered the same issue. The temporary workaround is to downgrade phonegap to version 3.3, because with older version everything works fine.
npm uninstalll phonegap
npm install [email protected]
i am facing the same issue
Thx @wszymaniak , I also had to remove the build directory:
npm -g uninstall phonegap
npm -g install [email protected] --save-dev
rm -r phonegap
I have the same issue but downgrating to 3.3 version doesn't help. Does anybody has any solutions to fix it?
did you remove phonegap directory ??
I made:
npm -g uninstall phonegap
npm -g install [email protected]
For now phonegap version is 3.3 and during teamCity build 3.3 version is used
and reconfigure phonegap to another user folder
I'm running this tasks on TeamCity
Issue resolved. It was problem with android-sdk
I had a very similar issue, but it was ios and android related. It turned out to be related to how cordova-cli detects the parent dir, which was forcing the phonegap local build call to use app/platforms rather than app/config.path/platforms (same with pugins.)
While I don't know that it's backwards compatible (I'm very new to the cordova world) this change fixed the issue for me.
https://github.com/streamlinesocial/grunt-phonegap/commit/15e43bbcdcc797e3a7188bfc228ac6da0406c8d0
(I made a 2nd commit to update the tests per contrib instructions - and could even work to help make this backwards compatible if it helps.)
@OlgaBielkina I have now investigated and fixed this issue so you can use latest phonegap. There is an existence check that looks for config.xml in the phonegap directory and then recurses upwards until it finds a better match. You can fix by copying it manually or by using my fork, which also includes all of the unmerged pull requests. There are a couple of tests failing but these are for code I've not updated. I will submit a pull request with my changes now.