cordova-plugin-googlemaps icon indicating copy to clipboard operation
cordova-plugin-googlemaps copied to clipboard

Cannot install plugin

Open cadz7 opened this issue 12 years ago • 8 comments

Hi,

When I try to add the plugin with the Android and iOS keys I get the following error:
cordova plugin add plugin.google.maps --variable API_KEY_FOR_ANDROID="[KEY]" -- variable API_KEY_FOR_IOS="[KEY]"

Fetching plugin "android.support.v4" via plugin registry
Error during processing of action! Attempting to revert... 
Failed to install 'plugin.google.maps':Error: Uh oh!
"/myApp/plugins/plugin.google.maps/src/android/plugin/google/maps/AsyncLicenseInfo.java" not found!

I have setup the environment as shown in the Tutorial for Mac. Can someone please help me out.

Thanks

cadz7 avatar Jul 14 '14 04:07 cadz7

I don't know why this error happened, but it seems the cordova-cli problem or network problem, something like that. Or sometimes the cordova plugin repository may happen some errors.

My advices are:

  1. try one more time.
  2. Confirm you have fully installed of environment tools (such as git, apache ant, etc)
  3. Confirm you use the latest version of Cordova.

wf9a5m75 avatar Jul 14 '14 07:07 wf9a5m75

I made a new cordova app and updated cordova through: npm install -g cordova gulp

I still seem to get the error. I have ant, adb, git setup and I use them for my other cordova projects. Does the plugin need any other external dependancy that I might be missing? I'm on a Mac OS X 10.9.3.

Thanks

cadz7 avatar Jul 14 '14 15:07 cadz7

Is this helpful? http://stackoverflow.com/questions/23121382/cant-install-cordova-plugins-from-git-on-cli

wf9a5m75 avatar Jul 14 '14 17:07 wf9a5m75

Or try to install the plugib by hand. https://github.com/wf9a5m75/phonegap-googlemaps-plugin/wiki/Manual-Installation

wf9a5m75 avatar Jul 14 '14 17:07 wf9a5m75

I would avoid doing it manually since I've never had any problems installing cordova plugins from CLI. If I transferred entire plugins folder, where would I have to replace the Android/iOS keys?

cadz7 avatar Jul 14 '14 18:07 cadz7

Ok, try to install from git.

$> cordova plugin add https://github.com/wf9a5m75/phonegap-googlemaps-plugin.git --variable API_KEY_FOR_ANDROID=<YOUR_KEY> --variable API_KEY_FOR_IOS=<YOUR_KEY>

This should work.

wf9a5m75 avatar Jul 15 '14 06:07 wf9a5m75

It works!

Thanks a lot. I'm not sure what the issue is with just doing cordova plugin add plugin.google.maps

cadz7 avatar Jul 15 '14 16:07 cadz7

Great!

wf9a5m75 avatar Jul 15 '14 16:07 wf9a5m75