简体   繁体   中英

Visual Studio 2015 RC Cordova Tools - Plugin Fails to Launch

After struggling for several hours with getting Visual Studio 2015 Cordova Tools set up and running, the first plugin I add, Device, fails to launch at onDeviceReady. No error is thrown. It simply does not launch and when I attempt to access one of its properties, then I get a JavaScript undefined exception.

Can anyone point me at a way to get at the cause of a plugin simply not working?

Make sure the below is added on the top of your page:

<!-- Cordova reference, this is added to your app when it's built. -->
<script src="cordova.js"></script>
<script src="scripts/platformOverrides.js"></script>
<script src="scripts/index.js"></script>

And Make sure the callbck events are added:

    <script>

    //Events
    document.addEventListener("deviceready", onDeviceReady, false);

    </script>

If it helps, the config file looks like this for the plugin in question:

   <vs:plugin name="org.apache.cordova.device" version="0.2.12" />

FYI - I have found the config designer useless - and have to edit the versions manually before deploying to the app stores (in this case for both win and android). Using VS2013 - to scared of VS2015 RTM. My config broke at some point while adding plugins, and now is half-baked, but working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM