Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cordova Unable to load platformapi

I have been having this issue for few days now. Cordova won't run in browser, error says browser is not added as a platform. However, trying to add browser as a platform, cause another error which says Unable to load platfromapi from platform. It also says that browser is not a valid platform. See screenshots:

Cordova issues 1 Cordova issues 2

like image 467
Ali ArtSharks Avatar asked Oct 17 '17 21:10

Ali ArtSharks


2 Answers

Remove the platform which you try to run on it (browser, ios, android, and etc.)

cordova platform rm browser 

Add the platform again

cordova platform add browser 

You can run

cordova run browser 
like image 67
Muhammed Tanriverdi Avatar answered Sep 20 '22 06:09

Muhammed Tanriverdi


It looks like the plugin PlatformApi (or what its name is exactly) is not supported by the browser platform.

You can not use the "cordova platform add browser" because the plugin was not written to work with the browser

Maybe it has some specific features that can not be emulated in the browser.

like image 37
DreamWave Avatar answered Sep 19 '22 06:09

DreamWave