0

Ive finnished a final year project using phonegap on OSX and i want to make a APK for user testing.

When i've been testing the app on my android tablet i use

phonegap run android // or // cordova run android

it builds and goes onto my android device fine, works properly and all the plugins work fine, however i want to be able to make its own .APK file so friends can test it and give me feedback.

I was told to use

phonegap build android --release

When i use this command it will fall over with an exit code 1 saying i may not have the required platform or OS to build this project, despite when running the previous command it says build fine.

Error code in CLI

    BUILD FAILED

Total time: 4.202 secs

/Users/robertlemm/Development/phonegap_dev/Little_Scavngers/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                    ^
Error code 1 for command: /Users/robertlemm/Development/phonegap_dev/Little_Scavngers/platforms/android/gradlew with args: cdvBuildRelease,-b,/Users/robertlemm/Development/phonegap_dev/Little_Scavngers/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /Users/robertlemm/Development/phonegap_dev/Little_Scavngers/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /Users/robertlemm/Development/phonegap_dev/Little_Scavngers/platforms/android/cordova/build: Command failed with exit code 1

I've ensured android tools & platform tools are up in my $PATH, checked SDK manager to ensure ive got version 14 to latest installed, checked the Platforms.JSON file to ensure the versions are set to the minimum, the config.xml says <preference name="android-minSdkVersion" value="16" />

Honestly not sure how to do it

Rlemm1991
  • 505
  • 1
  • 7
  • 20

1 Answers1

0

Have you tried removing and adding again the android platform? I remember having this issue several times and fixing it by just doing that.

Joaquin.B
  • 25
  • 9