0 Replies Latest reply on Apr 5, 2017 10:50 PM by carlosr56034200

    unable to build an android apk



      phonegap -v6.4.7

      cordova  -v6.5.0

      npm      -v4.3.0


      I get the following error when using the command: phonegap -d build android


      [36m[phonegap] [39m executing 'cordova -d build android ' ...

      No scripts found for hook "before_build".





      No scripts found for hook "before_prepare".



      Checking config.xml for saved platforms that haven't been added to the project





      Checking for any plugins added to the project that have not been installed in android platform





      No differences found between plugins added to project and installed in android platform. Continuing...





      Generating platform-specific config.xml from defaults for android at W:\gap\CameraApp\platforms\android\res\xml\config.xml



      Merging project's config.xml into platform-specific android config.xml





      Merging and updating files from [www, platforms\android\platform_www] to platforms\android\assets\www





      Wrote out android application name "helloworld" to W:\gap\CameraApp\platforms\android\res\values\strings.xml





      android-versionCode not found in config.xml. Generating a code based on version in config.xml (1.0.0): 10000





      Wrote out Android package name "com.phonegap.helloworld" to W:\gap\CameraApp\platforms\android\src\com\phonegap\helloworld\MainActivity.java





      Updating icons at res





      Updating splash screens at res





      Prepared android project successfully





      No scripts found for hook "after_prepare".





      Checking config.xml for saved plugins that haven't been added to the project





      No scripts found for hook "before_compile".






      JAVA_HOME=C:\Program Files\Java\jdk1.8.0_121



      Error: Error

          at Object.module.exports.check_gradle (W:\gap\CameraApp\platforms\android\cordova\lib\check_reqs.js:90:25)

          at GradleBuilder.prepEnv (W:\gap\CameraApp\platforms\android\cordova\lib\builders\GradleBuilder.js:161:23)

          at Api.module.exports.run (W:\gap\CameraApp\platforms\android\cordova\lib\build.js:152:20)

          at W:\gap\CameraApp\platforms\android\cordova\Api.js:345:43

          at _fulfilled (W:\gap\CameraApp\platforms\android\cordova\node_modules\q\q.js:834:54)

          at self.promiseDispatch.done (W:\gap\CameraApp\platforms\android\cordova\node_modules\q\q.js:863:30)

          at Promise.promise.promiseDispatch (W:\gap\CameraApp\platforms\android\cordova\node_modules\q\q.js:796:13)

          at W:\gap\CameraApp\platforms\android\cordova\node_modules\q\q.js:604:44

          at runSingle (W:\gap\CameraApp\platforms\android\cordova\node_modules\q\q.js:137:13)

          at flush (W:\gap\CameraApp\platforms\android\cordova\node_modules\q\q.js:125:13)







      I have tried to read all the docs I can get my hands on but have not found an answer.


      I'm following a YouTube tutorial and a pluralsight course. the pluralsight course seems to be out of date because the versions seem to be too out of date. the video seems more up to date.