# Build fail after add cordova plugin.google.maps

**URL:** <https://forum.ionicframework.com/t/build-fail-after-add-cordova-plugin-google-maps/16094>\
**Category:** uncategorized\
**Created:** [January 21, 2015, 8:16am UTC](https://forum.ionicframework.com/t/build-fail-after-add-cordova-plugin-google-maps/16094 "2015-01-21T08:16:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![pivalig](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pivalig/32/100053_2.png) [@pivalig](https://forum.ionicframework.com/u/pivalig)\
**Post date:** [January 21, 2015, 8:16am UTC](https://forum.ionicframework.com/t/build-fail-after-add-cordova-plugin-google-maps/16094/1 "2015-01-21T08:16:58Z")

</div>

Hello community a better framework for hybrid apps!

I need some help.

i try to integrate plugin.google.maps using this tutorial [https://github.com/wf9a5m75/ionic\_test](https://github.com/wf9a5m75/ionic_test)  
and after install plugin and run “ionic build android” i get this exception

```auto
:compileDebugJava/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/GoogleMaps.java:126: error: cannot find symbol
    root = (ViewGroup) webView.getParent();
                              ^
  symbol: method getParent()
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/GoogleMaps.java:184: error: cannot find symbol
          webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
                 ^
  symbol: method setLayerType(int,<null>)
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/GoogleMaps.java:193: error: cannot find symbol
          webView.setBackgroundColor(0);
                 ^
  symbol: method setBackgroundColor(int)
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/GoogleMaps.java:781: error: cannot find symbol
    webView.setVisibility(View.GONE);
           ^
  symbol: method setVisibility(int)
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/GoogleMaps.java:861: error: cannot find symbol
          divTop - webView.getScrollY(), 
                          ^
  symbol: method getScrollY()
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/GoogleMaps.java:863: error: cannot find symbol
          divTop + divH - webView.getScrollY());
                                 ^
  symbol: method getScrollY()
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:52: error: cannot find symbol
    this.root = (ViewGroup) webView.getParent();
                                   ^
  symbol: method getParent()
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:54: error: cannot find symbol
    webView.setBackgroundColor(Color.TRANSPARENT);
           ^
  symbol: method setBackgroundColor(int)
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:56: error: cannot find symbol
      webView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
             ^
  symbol: method setLayerType(int,<null>)
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:129: error: cannot find symbol
    int scrollY = webView.getScrollY();
                         ^
  symbol: method getScrollY()
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:177: error: incompatible types: CordovaWebView cannot be converted to View
    frontLayer.removeView(webView);
                          ^
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:188: error: incompatible types: CordovaWebView cannot be converted to View
    root.addView(webView);
                 ^
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:194: error: cannot find symbol
    scrollView.scrollTo(webView.getScrollX(), webView.getScrollY());
                               ^
  symbol: method getScrollX()
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:194: error: cannot find symbol
    scrollView.scrollTo(webView.getScrollX(), webView.getScrollY());
                                                     ^
  symbol: method getScrollY()
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:208: error: no suitable method found for removeView(CordovaWebView)
    root.removeView(webView);
        ^
    method ViewManager.removeView(View) is not applicable
      (argument mismatch; CordovaWebView cannot be converted to View)
    method ViewGroup.removeView(View) is not applicable
      (argument mismatch; CordovaWebView cannot be converted to View)
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:215: error: incompatible types: CordovaWebView cannot be converted to View
    frontLayer.addView(webView);
                       ^
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:252: error: cannot find symbol
        webView.requestFocus(View.FOCUS_DOWN);
               ^
  symbol: method requestFocus(int)
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:257: error: cannot find symbol
      int scrollY = webView.getScrollY();
                           ^
  symbol: method getScrollY()
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:283: error: cannot find symbol
        webView.requestFocus(View.FOCUS_DOWN);
               ^
  symbol: method requestFocus(int)
  location: variable webView of type CordovaWebView
/Volumes/Archive/projects/mq/platforms/android/src/plugin/google/maps/MyPluginLayout.java:294: error: cannot find symbol
      int scrollY = webView.getScrollY();
                           ^
  symbol: method getScrollY()
  location: variable webView of type CordovaWebView
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
20 errors
 FAILED

```

* * *

What’s wrong? Thank’s!

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [January 22, 2015, 6:59pm UTC](https://forum.ionicframework.com/t/build-fail-after-add-cordova-plugin-google-maps/16094/2 "2015-01-22T18:59:05Z")

</div>

Hmm did you add the plugin after adding the android project?  
You may need to do this

```auto
ionic platform rm android
ionic platform add android

```

---

<div class="post-metadata">

**Author:** ![pivalig](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/pivalig/32/100053_2.png) [@pivalig](https://forum.ionicframework.com/u/pivalig)\
**Post date:** [January 22, 2015, 7:24pm UTC](https://forum.ionicframework.com/t/build-fail-after-add-cordova-plugin-google-maps/16094/3 "2015-01-22T19:24:44Z")

</div>

Yep.  
And i get ionic-test app from [https://github.com/wf9a5m75/ionic\_test](https://github.com/wf9a5m75/ionic_test)  
step-by-step. as result i see map on ios emulator but it’s blank on android

---

<div class="post-metadata">

**Author:** ![boopage](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@boopage](https://forum.ionicframework.com/u/boopage)\
**Post date:** [April 9, 2015, 4:37am UTC](https://forum.ionicframework.com/t/build-fail-after-add-cordova-plugin-google-maps/16094/4 "2015-04-09T04:37:20Z")

</div>

Hi, I get get this error after added the crosswalk browser ionic browser add crosswalk, [https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/302#issuecomment-87138144](https://github.com/wf9a5m75/phonegap-googlemaps-plugin/issues/302#issuecomment-87138144), I updated everything and I want to try to target android 21 but when I run the command it always add Android SDK API 19, any idea?  
I also added this to my config.xml

Adding crosswalk browser

Downloaded cordova-crosswalk-engine

Downloaded Cordova Android for Crosswalk

Downloaded Crosswalk webviews

Fetching Android SDK API 19.1.0

---

<div class="post-metadata">

**Author:** ![rolinger](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rolinger](https://forum.ionicframework.com/u/rolinger)\
**Post date:** [May 1, 2015, 7:10pm UTC](https://forum.ionicframework.com/t/build-fail-after-add-cordova-plugin-google-maps/16094/5 "2015-05-01T19:10:51Z")

</div>

Was this ever resolved? I too am getting the same errors…38 of them and then the build fails. Driving me nuts as I have searched 20 diff times for this error and haven’t really come across any useful info to help me understand what is going on.

---

<div class="post-metadata">

**Author:** ![rolinger](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rolinger](https://forum.ionicframework.com/u/rolinger)\
**Post date:** [May 1, 2015, 7:13pm UTC](https://forum.ionicframework.com/t/build-fail-after-add-cordova-plugin-google-maps/16094/6 "2015-05-01T19:13:42Z")

</div>

…and I removed the platform android and re-added it, still getting the same results/errors.

---

<div class="post-metadata">

**Author:** ![rolinger](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@rolinger](https://forum.ionicframework.com/u/rolinger)\
**Post date:** [May 1, 2015, 7:21pm UTC](https://forum.ionicframework.com/t/build-fail-after-add-cordova-plugin-google-maps/16094/7 "2015-05-01T19:21:35Z")

</div>

Ok, I did the following:

cordova plugim rm plugin.google.maps  
cordova plugin rm com.google.playservices  
cordova plugin add [https://github.com/wf9a5m75/google-play-services#v23](https://github.com/wf9a5m75/google-play-services#v23)  
cordova plugin add plugin.google.maps --variable API\_KEY\_FOR\_ANDROID=“YOUR\_ANDROID\_API\_KEY\_IS\_HERE” --variable API\_KEY\_FOR\_IOS=“YOUR\_IOS\_API\_KEY\_IS\_HERE”

And that reduced my errors from 38 down to 24.

These are the two primary errors now, about 12 from each .java file:

C:\Users\RPO\Documents\Developer\MobileApp\lust\platforms\android\src\plugin\google\maps\GoogleMaps.java:881: error: cannot find symbol  
divTop + divH - webView.getScrollY());  
^  
symbol: method getScrollY()  
location: variable webView of type CordovaWebView  
C:\Users\RPO\Documents\Developer\MobileApp\lust\platforms\android\src\plugin\google\maps\MyPluginLayout.java:53: error: cannot find symbol  
this.root = (ViewGroup) webView.getParent();

And my relevant plugins:  
android.support.v4 21.0.1 "Android Support v4"  
com.google.playservices 23.0.0 "Google Play Services for Android  
com.jamiestarke.webviewdebug 1.0.8 "WebView Debug"  
com.ludei.webview.plus 2.4.3 “Webview+”
