Phone Mail Error: "Error Displaying Android Goals" When Installing Phonegap on Ubuntu

http://cordova.apache.org/docs/en/3.3.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide

As stated in the above document, I already installed the necessary software for Phonegap, since I have versions:

For Java:

$ java -version java version "1.7.0_51" Java(TM) SE Runtime 

Environment (build 1.7.0_51-b13) Java HotSpot (TM) virtual machine

(build 24.51-b03, mixed mode)

For ANT

 $ ant -version 

Apache Ant (TM) version 1.8.2 compiled on December 3

2011

For Node.JS

 $ npm -version 

1.4.3

Now the problem is that I am creating a phonegap project for Android, like this "$ cordova create hello com.example.hello HelloWorld", it creates a project directory with the name "hello".

But now, when I enter this command "$ cordova platform add android" into the "hello" directory, it gives me the error shown below:

/ hello $ cordova platform add android Creating an Android project ...

/home/deep/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:126 throw e; ^ Error: an error occurred while displaying Android goals at /home/deep/.cordova/lib/android/cordova/3.4.0/bin/lib/check_reqs.js:87:29 in _rejected (/home/deep/.cordova /lib/android/cordova/3.4.0/bin/ node_modules / q / q.js: 808: 24) at /home/deep/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/ q.js: 834: 30 in Promise.when (/home/deep/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:1079:31) in Promise.promise.promiseDispatch (/home/deep/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:752:41) on /home/deep/.cordova/lib/android/cordova/3.4. 0 / bin / node_modules / q / q.js: 574: 44 on a flash (/home/deep/.cordova/lib/android/cordova/3.4.0/bin/node_modules/q/q.js:108:17) on process._tickCallback (node.js: 415: 13) Error: /home/deep/.cordova/lib/android/cordova/3.4.0/bin/create: command failed with exit code 8 in ChildProcess.whenDone (/ usr / lib / node_modules / cordova / src / superspawn.js: 112: 23) at ChildProcess.EventEmitter.emit (events.js: 98: 17) at maybeClose (child_process.js: 743: 16) in Process.ChildProcess._handle.onexit (child_process.js : 810: 5)

How to get rid of this problem?

+6
source share
5 answers

I could fix this problem by following the cordova-guide . Shortly speaking:

  • download adt-bundle
  • unzip it of your choice.
  • add named folders to the PATH variable:

    export PATH=${PATH}:/home/me/opt/adt-bundle/sdk/platform-tools:/home/me/opt/adt-bundle/sdk/tools

+7
source

Hey, if you use windows, then you are missing environment variables. try this for this error: "Error specifying Android goals"

  • go to My computer - right-click - properties - go to system settings - environment variables.

  • add some necessary variables, I did it like this:

using my local script:

SDKHOME → C: \ development \ AndroidADTBundle \ ADT \ sdk JAVAJDK-> C: \ Program Files \ Java \ jdk1.8.0_05 \

  • Then update the PATH variable. For example: ";% SDKHOME% \ tools;% SDKHOME% \ platform tools,% JAVAJDK% \ Bin"

After that, make your team, in my case it's a phone saver instead of a cord. And it should work: TEAM: phonegap build android

let me know how this happens.

+6
source

I had the same problem, none of the previous underders work for me. The problem is that the telephone service is not compatible with Android API 20.

First, make sure you set all of the nedded environment variables:

 export ANT_HOME=/usr/share/ant export JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64" export PATH=${PATH}:~/sdk/adt-bundle-linux-x86_64-20140702/sdk/platform-tools/:~/adt/adt-bundle-linux-x86_64-20140702/sdk/tools:$JAVA_HOME/bin:$ANT_HOME/bin 

Go to the shell and start the android, after that check API 19 and install it:

 $ android 

Now create the device from the Android android using API 19, which you downloaded to:

 $ android avd 

Now try adding the platform to the cord:

 $ cordova platform add android 

Or check the requirements using the cordova script check (~ / .cordova / lib / android / cordova / 3.5.0 / bin / check_reqs)

+4
source

Download the Android SDK?

try entering the "android" command on the command line or terminal

See the answer I typed here:

answer

+2
source

try this one

install ant using brew

Download and install Homebrew by running the following command in the terminal:

 ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" 

Install Apache ant via Homebrew by running

 brew install ant 

Run the PhoneGap assembly again and it should successfully compile and install your Android app.

0
source

All Articles