0

I have to test my hybrid mobile application on my android device,I have selected "USB debugging" in my phone and I have selected the "Unknown sources" option,but when I try to deploy my application in my mobile I get this error:

Building package: [D:\WebMobile\test\backupsProjetWebMobile2\KendoUITabStrip1\obj\Debug\MyProjet.zip]
        Project files uploaded to the cloud.
        Sending build request for project MyProjet with parameters ProjectTypeGuids={070BCB52-5A75-4F8C-A973-144AF0EAFCC9}
Platform=Android
Configuration=Debug
LiveSyncToken=5uW/86s7080iMfWs0yNn+vJIKWo6n1qh4Lpa8kEnoUNFIaJOOQSDimQ9e0N6ELxXgt2bTOb/Xp6eRqCttuaoxQCzlLku533tlF1hvwrKPpxPeX/CfV/aGFN8Wr6MJl4D.
C:\Users\Client\AppData\Local\Microsoft\VisualStudio\14.0\Extensions\zc3hmmck.xbh\Targets\Build.targets(189,3): error : Server build failed. Server output: Project "MyProjet.tmp.proj" (default targets):
    android Build Tooling revision 2015.11.03.5r
    Warning: Failed to install 'cordova-plugin-mapbox':Error: Variable(s) missing: ACCESS_TOKEN
    at /home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/cordova-lib/cordova-lib/src/plugman/install.js:324:23
    at _fulfilled (/home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:787:54)
    at self.promiseDispatch.done (/home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:816:30)
    at Promise.promise.promiseDispatch (/home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:749:13)
    at /home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:557:44
    at flush (/home/builder/BpcTooling/Cordova3/node_modules/plugman/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:419:13)
    Warning: Variable(s) missing: ACCESS_TOKEN
    Warning: /home/builder/BpcTooling/Cordova3/node_modules/cordova-build-utils/bin/install-plugins-3.js:189
    Warning: throw Error("exit code: " + code);
                                  ^
    Warning: Error: exit code: 1
    at Error (<anonymous>)
    at ChildProcess.<anonymous> (/home/builder/BpcTooling/Cordova3/node_modules/cordova-build-utils/bin/install-plugins-3.js:189:14)
    at ChildProcess.emit (events.js:98:17)
    at Process.ChildProcess._handle.onexit (child_process.js:810:12)
    Error: Build failed during execution
    Error: 'Build failed with error code 8'
Done building project "MyProjet.tmp.proj" -- FAILED.
.
Done building project "MyProjet.iceproj" -- FAILED.

Build FAILED.

I work with Telerik-AppBuilder visual Studio 2015 extension(kendo-ui) my android phone is Samsung Galaxy Star Duos GT-S7262 version 4.1.2 any help please and thanks

update:

I have folloewed this link [https://github.com/Telerik-Verified-Plugins/Mapbox] but I get this error:1

C:\Users\Admin>cordova plugin add https://github.com/Telerik-Verified-Plugins/Mapbox --variable ACCESS_TOKEN=my.access.token

Current working directory is not a Cordova-based project.

I have installed the cordova-plugins with npm,but I still get the problem :(

hanali
  • 227
  • 7
  • 17
  • `Warning: Failed to install 'cordova-plugin-mapbox':Error: Variable(s) missing: ACCESS_TOKEN` what is not clear? – njzk2 Nov 05 '15 at 21:10
  • thanks njzk2,I thought that the porblem was from the access token,that I should use it to use the map,but should I put for every type of mobile(ios,android,windows phone) the same access_token?? – hanali Nov 05 '15 at 21:49
  • I have added a Mapbox access token but I still get the same porblem with my device :( – hanali Nov 05 '15 at 23:21

1 Answers1

2

So the question boils down to: how in Visual Studio do you provide Cordova variables to plugins?

(You tried adding the plugin from the c:/users/admin folder which is not your project folder, that's why the Cordova CLI said: "Current working directory is not a Cordova-based project.")

I'm assuming you're using the AppBuilder extension for Visual Studio. If so, please read this doc, especially about how to configure variables: http://docs.telerik.com/platform/appbuilder/creating-your-project/using-plugins/using-verified-plugins/install-verified-plugins

Eddy Verbruggen
  • 3,550
  • 1
  • 15
  • 27