Meteor mobile settings problems

I am doing a meteor build (meteor build c:\www\app-name --server= --mobile-settings=settings.json) for an android cordova app build of my meteor app.

I am then opening this project in android studio. It all seems to run well however once I run the project from android studio to my android device I seem to lose all the settings from the settings.json? Other than that the app runs fine.

I get an error from within my code ‘Meteor.settings.public’ is undefined? I get this no other place than the app.

Am I doing something wrong here?

I am missing the --directory option in your statement.

Thanks but that isn’t required in the statement. The first attribute in your build statement if not specified is always taken as the directory.

Ah, I see, didn’t know that. Apart from this, I have no clue what is going wrong here. My own build works in Android Studio, using the settings.json as expected. Yet, I am on MacOS instead of Windows.

Try replacing --mobile-settings with --settings and see if that works

Hi, everyone.
I’ve experienced the same problem.
I’ve resolved it removing cordova-build directory before new build:
rm -rf .meteor/local/cordova-build

See more here: