Search code examples
javascriptcordovaplugman

Plugman - The provided path is not an Android Project


I am currently trying to develop a Cordova plugin for a project at work. I have developed a basic skeleton, including a plugin.xml file, a javascript file to act as the interface, and a skeleton file for the android version of the plugin. To facilitate testing, I have created a cordova project and added the android platform to it.

When I attempt to install the plugin to the test project, I receive an error saying 'The provided path "omitted" is not an Android Project' (Along with a stack trace saying the same thing). I have checked that the platform is installed in the project, and the project does run. The plugin.xml file is as below:

<?xml version="1.0" encoding = "UTF-8"?>
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://shemas.android.com/apk/res/android"
id="omitted"
version="1.0.0">

    <name>MediaPlugin</name>
    <author>Author Name</author>

    <js-module src="media.js" name="MediaPlugin">
        <clobbers target="MediaPlugin"/>
    </js-module>

    <platform name="android">
        <config-file target="config.xml" parent="/*">
            <feature name="MediaPlugin">
                <param name="android-package" value="omitted"/>
            </feature>
        </config-file>
    </platform>

I am using version 5.2.0 of cordova, and version 1.0.5 of Plugman. Any help with this issue would be greatly appreciated.


Solution

  • You are pointing to the incorrect folder. The correct path is to the file containing AndroidManifest.xml which would be something like /yourProject/platforms/android