title: what is the correct way to manually add Cordova plugin to Cordova project
body: <p>I'm developing Cordova project using Android Studio. I want to Cordova device plugin to my project. As I understand Cordova plugin consists of <code>device.js</code> and <code>Device.java</code>, which I've found in the folder of plugin. I copied <code>Device.java</code> into <code>CordovaLib/src/org/apache/cordova/device/</code> folder and <code>device.js</code> into <code>assets/www/plugins/org.apache.cordova.device/www</code> folder. I also included into <code>index.html</code> <code>cordova_plugins.js</code> file, which was automatically created by Cordova. It has the following content:</p>
  
  <pre><code>cordova.define('cordova/plugin_list', function(require, exports, module) {
  module.exports = [
      {
          "file": "plugins/org.apache.cordova.device/www/device.js",
          "id": "org.apache.cordova.device.device",
          "clobbers": [
              "device"
          ]
      }
  ];
  module.exports.metadata = 
  // TOP OF METADATA
  {
      "org.apache.cordova.device": "0.2.12"
  }
  // BOTTOM OF METADATA
  });
  </code></pre>
  
  <p>Now when I successfully build my app and run it I get <code>Error initializing Cordova: Class not found</code> error. What am I doing wrong?</p>