You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Diego Rubio (JIRA)" <ji...@apache.org> on 2017/11/06 20:09:00 UTC
[jira] [Created] (CB-13544) Can't install plugin. Your android
platform does not have Api.js
Diego Rubio created CB-13544:
--------------------------------
Summary: Can't install plugin. Your android platform does not have Api.js
Key: CB-13544
URL: https://issues.apache.org/jira/browse/CB-13544
Project: Apache Cordova
Issue Type: Bug
Components: cordova-android
Affects Versions: 6.3.0
Environment: Node: v8.9.0
NPM: 5.5.1
Cordova: 7.1.0
Plugman: 1.5.1
cordova-android: 6.3.0
Reporter: Diego Rubio
Assignee: Joe Bowser
I'm trying to create an Android/iOS plugin but while trying Cordova is throwing an error. Here are the steps I follow:
{{plugman create --name myplugin --plugin_id org.nov.myplugin --plugin_version 0.0.1
cd myplugin
plugman platform add --platform_name android
cd ..
cordova create myapp && cd myapp
cordova platform add android@latest
cd ..
plugman install --platform android --project ./myapp --plugin ./myplugin}}
And this is the output:
{{Creating a new cordova project.
Using cordova-fetch for cordova-android@latest
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: io.cordova.hellocordova
Name: HelloCordova
Activity: MainActivity
Android target: android-26
Subproject Path: CordovaLib
Android project created with cordova-android@6.3.0
Discovered plugin "cordova-plugin-whitelist" in config.xml. Adding it to the project
Installing "cordova-plugin-whitelist" for android
This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
Adding cordova-plugin-whitelist to package.json
Saved plugin info for "cordova-plugin-whitelist" to config.xml
--save flag or autosave detected
Saving android@latest into config.xml file ...
Installing "org.nov.myplugin" for android
Unable to load PlatformApi from platform. Error: Cannot find module '/Users/diego/cordovaplayground/myapp/cordova/Api.js'
The platform "android" does not appear to be a valid cordova platform. It is missing API.js. android not supported.
Failed to install 'org.nov.myplugin': Error: Your android platform does not have Api.js
at Object.getPlatformApiFunction (/usr/local/lib/node_modules/plugman/node_modules/cordova-lib/src/cordova/util.js:514:19)
at Object.getPlatformApi (/usr/local/lib/node_modules/plugman/node_modules/cordova-lib/src/platforms/platforms.js:55:25)
at handleInstall (/usr/local/lib/node_modules/plugman/node_modules/cordova-lib/src/plugman/install.js:593:29)
at /usr/local/lib/node_modules/plugman/node_modules/cordova-lib/src/plugman/install.js:364:24
at _fulfilled (/usr/local/lib/node_modules/plugman/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/usr/local/lib/node_modules/plugman/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/usr/local/lib/node_modules/plugman/node_modules/q/q.js:749:13)
at /usr/local/lib/node_modules/plugman/node_modules/q/q.js:557:44
at flush (/usr/local/lib/node_modules/plugman/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
Your android platform does not have Api.js}}
Any help would be appreciated, thanks!.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org