question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error when running ember cdv platform add android

See original GitHub issue

Followed the instructions, also I have this in my package.json and bower.json:

  "name": "com.company.Name",

but getting this, not sure why:

ember cdv platform add android
Running 'cordova platform add android'
Adding android project...
Error: Error validating package name. Package name must look like: com.company.Name
File: /bin/sh
Command failed: cordova platform add android
Error: Command failed: cordova platform add android
    at checkExecSyncError (child_process.js:469:13)
    at execSync (child_process.js:509:13)
    at /home/user/my-ember-cordova/node_modules/ember-cordova/lib/tasks/bash.js:23:7
    at lib$rsvp$$internal$$initializePromise (/home/user/my-ember-cordova/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1084:9)
    at PromiseExt.lib$rsvp$promise$$Promise (/home/user/my-ember-cordova/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:546:53)
    at new PromiseExt (/home/user/my-ember-cordova/node_modules/ember-cli/lib/ext/promise.js:32:8)
    at Class.module.exports.Task.extend.run (/home/user/my-ember-cordova/node_modules/ember-cordova/lib/tasks/bash.js:17:12)
    at Class.module.exports.Task.extend.run (/home/user/my-ember-cordova/node_modules/ember-cordova/lib/tasks/cordova.js:21:8)
    at Class.module.exports.run (/home/user/my-ember-cordova/node_modules/ember-cordova/lib/commands/cordova.js:54:27)
    at Class.module.exports.validateAndRun (/home/user/my-ember-cordova/node_modules/ember-cordova/lib/commands/cordova.js:44:17)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8

github_iconTop GitHub Comments

3reactions
valkcommented, Jun 5, 2016

Ok, as @thijsvdanker suggested, I did this:

cd ember-cordova/cordova
edit config.xml

The only thing that needed to be changed is the id of the <widget> tag with com.myapp.Mobile, so:

<widget id="com.myapp.Mobile" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

Then I ran:

ember cdv platform add android

and got success:

Running 'cordova platform add android'
Adding android project...
Creating Cordova project for the Android platform:
    Path: platforms/android
    Package: com.myapp.Mobile
    Name: mcordova
    Activity: MainActivity
    Android target: android-23
Android project created with cordova-android@5.1.1
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-whitelist@1" via npm
Installing "cordova-plugin-whitelist" for android

               This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

Thanks for the help @thijsvdanker !

Also!,

> cordova -v
6.2.0
0reactions
v3ss0ncommented, Jun 15, 2016

thanks its working now , just need to change locationType to hash! thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't serve platform browser - strange error-message · Issue #206 ...
ERROR : Expected a cordova platform to be installed that was not: browser: Not found in config.xml. You probably need to run ember...
Read more >
ember-cordova - Invalid or unexpected token on __dirname
And I'm trying to build first version of my app using ember cdv:build --platform=android --environment=production . Unfortunatelly, build fails ...
Read more >
CLI & Configuration - ember-cordova
When running a proxy command, file paths are relative to your cordova directory. For example, running ember cdv plugin add ../local-plugin-path (hint: just...
Read more >
Package failed on "cordova platform add android" - Ionic Forum
cordova platform add android. Using cordova-fetch for cordova-android@6.2.3. Error: Failed to fetch platform cordova-android@6.2.3
Read more >
5 min to a mobile app with Ember & Cordova
First, let's setup the project and proceed to install some basics. Below you can copy paste the relevant commands. npm install ember-cli -g ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found