0

我必须在我的 android 设备上测试我的混合移动应用程序,我在我的手机中选择了“USB 调试”并且我选择了“未知来源”选项,但是当我尝试在我的手机中部署我的应用程序时,我收到了这个错误:

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.

我使用 Telerik-AppBuilder visual Studio 2015 扩展(kendo-ui)我的 android 手机是三星 Galaxy Star Duos GT-S7262 版本 4.1.2 任何帮助,谢谢

更新:

我已关注此链接 [ https://github.com/Telerik-Verified-Plugins/Mapbox]但我收到此错误:1

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

当前工作目录不是基于 Cordova 的项目。

我已经用 npm 安装了cordova-plugins,但我仍然遇到问题:(

4

1 回答 1

2

所以问题归结为:如何在 Visual Studio 中为插件提供 Cordova 变量?

(您尝试从不是您的项目文件夹的 c:/users/admin 文件夹添加插件,这就是为什么 Cordova CLI 说:“当前工作目录不是基于 Cordova 的项目。”)

我假设您正在使用 Visual Studio 的 AppBuilder 扩展。如果是这样,请阅读此文档,尤其是有关如何配置变量的信息:http: //docs.telerik.com/platform/appbuilder/creating-your-project/using-plugins/using-verified-plugins/install-verified-plugins

于 2015-11-08T07:40:36.513 回答