Closed dwploc closed 9 years ago
Had a similar problem
Can't reproduce, you are using a very old version of cordova cli 3.4.1, try upgrading to 5.1.1
I try to reproduce with both 5.1.1 and 3.4.1-0.1.0 I try to reproduce specifying a directory and using ./ Do you have your Gruntfile in the same directory of config.xml ? Are you running grunt command from the same directory of config.xml of a directory inside platforms?
Here is the output when I try it, if I use 3.4.1, default android at that time frame uses ant, if you use 5.1.1 default android platform (i.e. 4.x) uses gradle.
With Both I don't see any errors. What errors do you see?
Here is my output http://pastebin.com/qZE5XdmA
When building the --release apk, the grunt command does not use the config.xml in the root of the project directory. If I directly access "cordova build android --release" it works fine.
Relevant sections:
grunt.registerTask('postbuild', function(){ grunt.file.copy('/home/dwploc/lwapp/platforms/android/ant-build/lwmobile-release.apk', '/home/dwploc/Downloads/lwmobile-release.apk'); grunt.log.write('APK saved in Downloads'); grunt.task.run('notify:mobile');
});
grunt.registerTask('buildmobile', function(){ grunt.task.run(['xmlpoke','cordovacli:build_android_release', 'postbuild']); });
Running "cordovacli:build_android_release" (cordovacli) task Verifying property cordovacli.build_android_release exists in config...OK File: [no files] Options: path="./", name="HelloCordova", id="io.cordova.hellocordova", args=["--release"], cli="cordova", command="build", platforms=["android"] Using cordova CLI version (3.4.1-0.1.0) Setting Current Working Directory (CWD) to ./ Running:/home/dwploc/lwapp/node_modules/cordova/bin/cordova build android --release Running command: /home/dwploc/lwapp/platforms/android/cordova/build --release Buildfile: /home/dwploc/lwapp/platforms/android/build.xml