0

I am using Ubuntu 14.04. I am trying to configure Ionic Framework. When I am trying to configure the platform for Android, I get the following error.

  /home/sameera/.cordova/lib/android/cordova/3.5.1/bin/node_modules/q/q.js:126
                throw e;
                      ^
  Error: An error occurred while listing Android targets
  at /home/sameera/.cordova/lib/android/cordova/3.5.1/bin/lib/check_reqs.js:87:29
  at _rejected (/home/sameera/.cordova/lib/android/cordova/3.5.1/bin/node_modules/q/q.js:808:24)
  at /home/sameera/.cordova/lib/android/cordova/3.5.1/bin/node_modules/q/q.js:834:30
  at Promise.when (/home/sameera/.cordova/lib/android/cordova/3.5.1/bin/node_modules/q/q.js:1079:31)
  at Promise.promise.promiseDispatch (/home/sameera/.cordova/lib/android/cordova/3.5.1/bin/node_modules/q/q.js:752:41)
  at /home/sameera/.cordova/lib/android/cordova/3.5.1/bin/node_modules/q/q.js:574:44
  at flush (/home/sameera/.cordova/lib/android/cordova/3.5.1/bin/node_modules/q/q.js:108:17)
  at process._tickCallback (node.js:419:13)
  Error: /home/sameera/.cordova/lib/android/cordova/3.5.1/bin/create: Command failed with exit code 8
  at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
  at ChildProcess.emit (events.js:98:17)
  at maybeClose (child_process.js:756:16)
  at Process.ChildProcess._handle.onexit (child_process.js:823:5)

I also added Android to the PATH like below:

  export PATH=${PATH}:~/home/sameera/Downloads/Softwares/android-studio/sdk/tools
  export PATH=${PATH}:~/home/sameera/Downloads/Softwares/android-studio/sdk/platform-tools
mraaroncruz
  • 3,780
  • 2
  • 32
  • 31
hash
  • 5,336
  • 7
  • 36
  • 59

1 Answers1

1

I faced same problem while configuring platform for Android. Maybe you don't have SDK platform for API 19 in android sdk manager (cordova 3.3 or 3.5 uses target sdk 19). Check out this answer for more.

Community
  • 1
  • 1
trueblue
  • 306
  • 1
  • 5
  • 17