Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error updating config for platform 'android': platforms is not defined #61

Closed
MehdiZonjy opened this issue Jul 4, 2016 · 6 comments
Closed

Comments

@MehdiZonjy
Copy link

Hi

I'm getting this error on an empty project targeting android after adding cordova-custom-config plugin.

cordova-custom-config: Skipping auto-restore of config file backup(s)
cordova-custom-config: Error updating config for platform 'android': platforms is not defined

Steps To Reproduce

1.create new project

> cordova  create demo-cordova
Creating a new cordova project.

2.Add Android platform

> cordova platform add android
Adding android project...
Creating Cordova project for the Android platform:
        Path: platforms\android
        Package: io.cordova.hellocordova
        Name: HelloCordova
        Activity: MainActivity
        Android target: android-23
Android project created with [email protected]
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.


3. Add plugin

> cordova plugin add https://github.com/dpa99c/cordova-custom-config
Fetching plugin "https://github.com/dpa99c/cordova-custom-config" via git clone
Repository "https://github.com/dpa99c/cordova-custom-config" checked out to git ref "master".
Installing "cordova-custom-config" for android
cordova-custom-config: Installing plugin dependencies...

4. Run

> cordova run android
cordova-custom-config: Skipping auto-restore of config file backup(s)
cordova-custom-config: Error updating config for platform 'android': platforms is not defined

Logs

- Cordova Prepare

> cordova prepare android --verbose
Executing script found in plugin cordova-custom-config for hook "before_prepare": plugins\cordova-custom-config\hooks\restoreBackups.js
Resolving module name for q => q
Resolving module name for path => path
cordova-custom-config: Running restoreBackups.js
cordova-custom-config: Loaded module dependencies
cordova-custom-config: Skipping auto-restore of config file backup(s)
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 config.xml from defaults for platform "android"
Wrote out Android application name to "HelloCordova"
Wrote out Android package name to "io.cordova.hellocordova"
This app does not have launcher icons defined
updated project successfully
Executing script found in plugin cordova-custom-config for hook "after_prepare": plugins\cordova-custom-config\hooks\applyCustomConfig.js
Resolving module name for q => q
Resolving module name for path => path
cordova-custom-config: Running applyCustomConfig.js
cordova-custom-config: Loaded module dependencies
cordova-custom-config: Error updating config for platform 'android': platforms is not defined

- Versions

> node -v
v5.12.0

> cordova -v
6.2.0

> cordova platform list
Installed platforms:
  android 5.1.1

> cordova plugin list
cordova-custom-config 2.0.1 "cordova-custom-config"
cordova-plugin-whitelist 1.2.2 "Whitelist"

@dpa99c
Copy link
Owner

dpa99c commented Jul 4, 2016

Oops, seems like this was introduced by pull request #59 - that'll teach me to publish changes from a pull request without testing them first :-(
I'll fix + publish a patch release as [email protected]

@dpa99c dpa99c closed this as completed in b4bf292 Jul 4, 2016
@dpa99c
Copy link
Owner

dpa99c commented Jul 4, 2016

[email protected] published to npm - should fix this issue

@MehdiZonjy
Copy link
Author

I've been pulling my hair for the past two hours trying to figure out what happened, thanks for the quick response ^^

@adamgins
Copy link

Hi, I am getting cordova-custom-config: Skipping auto-restore of config file backup(s) while trying to run this with Metero 1.6.1.1 and Meteor 1.7. Any ideas please?

@dpa99c
Copy link
Owner

dpa99c commented May 28, 2018

@adamgins it's just a log message indicating the autobackups of platform config files are not being restored because autobackup isn't enabled

@adamgins
Copy link

@dpa99c thanks

Trying to workout why my Meteor/Android app stops after starting ... a bit stumped. It seems like the key issue is device not ready after 5 seconds but not real clear on which log message would indicate what's actually wrong. The app runs fine on iOS. Any help appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants