As part of using the BackgroundGeolocation
plugin I need to move a resource-file
into the cordova project.
I am using this directive, that I have appended to the config.xml
file:
<resource-file
src="BackgroundGeolocationHeadlessTask.java"
target="app/src/main/java/com/transistorsoft/cordova/bggeo/BackgroundGeolocationHeadlessTask.java" />
BackgroundGeolocationHeadlessTask.java
is in my project root directory.
Here is some --verbose
build output:
%% Updating resource files at platforms/android
=> Errors executing Cordova commands:
While adding platform Android to Cordova project:
Error: Source path does not exist:
BackgroundGeolocationHeadlessTask.java
at updatePathInternal
(/Users/brucejo/mroot/app/.meteor/local/cordova-build/platforms/android/cordova/node_modules/cordova-common/src/FileUpdater.js:145:19)
at
/Users/brucejo/mroot/app/.meteor/local/cordova-build/platforms/android/cordova/node_modules/cordova-common/src/FileUpdater.js:223:19
at Array.forEach (<anonymous>)
at Object.updatePaths
(/Users/brucejo/mroot/app/.meteor/local/cordova-build/platforms/android/cordova/node_modules/cordova-common/src/FileUpdater.js:221:33)
at updateFileResources
(/Users/brucejo/mroot/app/.meteor/local/cordova-build/platforms/android/cordova/lib/prepare.js:432:17)
at
/Users/brucejo/mroot/app/.meteor/local/cordova-build/platforms/android/cordova/lib/prepare.js:51:9
at _fulfilled
...
I had this all working and then it suddenly stopped working…
- I believe that the meteor build system had somehow copied
BackgroundGeolocationHeadlessTask.java
into the<buildRoot>/android/project
folder, then I believe the directive took it from there. - Now the file is no longer getting copied into the
android/project
folder and is throwing the error.
Any and all help appreciated!!