question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

plugin/google/maps/PluginMap.java:86: error: cannot find symbol

See original GitHub issue

I’m submitting a … (check one with “x”)

  • question

  • any problem or bug report

  • feature request

  • Android

  • iOS

cordova information:

cc.fovea.cordova.purchase 7.1.0 "Purchase"
com.googlemaps.ios 2.6.0 "Google Maps SDK for iOS"
cordova-android-play-services-gradle-release 1.2.0 "cordova-android-play-services-gradle-release"
cordova-clipboard 1.1.1 "Clipboard"
cordova-launch-review 3.1.0 "Launch Review"
cordova-plugin-add-swift-support 1.7.1 "AddSwiftSupport"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-appminimize 1.0 "AppMinimize"
cordova-plugin-autostart 2.0.1 "Autostart"
cordova-plugin-camera 4.0.3-dev "Camera"
cordova-plugin-contacts-phonenumbers 0.0.9 "Contacts Phone Numbers"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-facebook4 1.9.1 "Facebook Connect"
cordova-plugin-firebase-analytics 0.10.2 "FirebaseAnalyticsPlugin"
cordova-plugin-geolocation 4.0.2-dev "Geolocation"
cordova-plugin-googlemaps 2.2.6-beta-20180222-2323 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 1.7.2 "InAppBrowser"
cordova-plugin-ionic 1.1.9 "IonicCordova"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-sim 1.3.3 "SIM"
cordova-plugin-splashscreen 4.1.0 "Splashscreen"
cordova-plugin-statusbar 2.4.2-dev "StatusBar"
cordova-plugin-stripe 1.5.3 "cordova-plugin-stripe"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-wkwebview-engine 1.1.6 "Cordova WKWebView Engine"
cordova-plugin-x-socialsharing 5.2.1 "SocialSharing"
cordova.plugins.diagnostic 3.9.2 "Diagnostic"
es6-promise-plugin 4.1.0 "Promise"
ionic-plugin-deeplinks 1.0.15 "Ionic Deeplink Plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"
onesignal-cordova-plugin 2.3.1 "OneSignal Push Notifications"

If you use @ionic-native/google-maps, please tell the package.json (only @ionic-native/core and @ionic-native/google-maps are fine mostly)

Current behavior:

incrementalReleaseJavaCompilationSafeguard
:compileReleaseJavaWithJavac
:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/Users/user/project/platforms/android/src/plugin/google/maps/PluginMap.java:86: error: cannot find symbol
    GoogleMap.OnInfoWindowLongClickListener, GoogleMap.OnInfoWindowCloseListener, GoogleMap.OnMyLocationClickListener, GoogleMap.OnPoiClickListener {
                                                                                           ^
  symbol:   class OnMyLocationClickListener
  location: class GoogleMap
/Users/user/project/platforms/android/src/plugin/google/maps/PluginMap.java:337: error: cannot find symbol
              map.setOnMyLocationClickListener(PluginMap.this);
                 ^
  symbol:   method setOnMyLocationClickListener(PluginMap)
  location: variable map of type GoogleMap
/Users/user/project/platforms/android/src/plugin/google/maps/PluginMap.java:768: error: cannot find symbol
                  map.setOnMyLocationClickListener(null);
                     ^
  symbol:   method setOnMyLocationClickListener(<null>)
  location: variable map of type GoogleMap
/Users/user/project/platforms/android/src/plugin/google/maps/PluginMap.java:2500: error: method does not override or implement a method from a supertype
  @Override
  ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 11.748 secs
Error: /Users/user/project/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/user/project/platforms/android/src/plugin/google/maps/PluginMap.java:86: error: cannot find symbol
    GoogleMap.OnInfoWindowLongClickListener, GoogleMap.OnInfoWindowCloseListener, GoogleMap.OnMyLocationClickListener, GoogleMap.OnPoiClickListener {
                                                                                           ^
  symbol:   class OnMyLocationClickListener
  location: class GoogleMap
/Users/user/project/platforms/android/src/plugin/google/maps/PluginMap.java:337: error: cannot find symbol
              map.setOnMyLocationClickListener(PluginMap.this);
                 ^
  symbol:   method setOnMyLocationClickListener(PluginMap)
  location: variable map of type GoogleMap
/Users/user/project/platforms/android/src/plugin/google/maps/PluginMap.java:768: error: cannot find symbol
                  map.setOnMyLocationClickListener(null);
                     ^
  symbol:   method setOnMyLocationClickListener(<null>)
  location: variable map of type GoogleMap
/Users/user/project/platforms/android/src/plugin/google/maps/PluginMap.java:2500: error: method does not override or implement a method from a supertype
  @Override
  ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
  • Ionic info
    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 7.1.0 

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node  : v9.2.1
    npm   : 5.6.0 
    OS    : macOS High Sierra
    Xcode : Xcode 9.2 Build version 9C40b 

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:26 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
wf9a5m75commented, Mar 6, 2018

Umm, it seems defaultBuildToolsVersion is the point.

1reaction
battikacommented, Feb 26, 2018

What other cordova plugins are you using? When I had the same problem it was caused by the onesignal plugin forcing an older version of Google Play Services via a gradle build script.

See here: https://github.com/OneSignal/OneSignal-Cordova-SDK/issues/297

I am not saying you have the same problem you might not be using OneSignal at all but I would look into you other Cordova plugins and gradle scripts.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Resolve The Cannot Find Symbol Error in Java - Rollbar
The cannot find symbol error refers to a situation where the Java compiler is unable to find the symbol associated with a given...
Read more >
java - What does a "Cannot find symbol" or "Cannot resolve ...
A "Cannot find symbol" error is about the identifiers. When your code is compiled, the compiler needs to work out what each and...
Read more >
The "Cannot find symbol" Compilation Error - Baeldung
The “cannot find symbol” error comes up mainly when we try to use a variable that's not defined or declared in our program....
Read more >
What Causes “Cannot find symbol” Compilation Error in Java?
Java Cannot find symbol error is a commonly occurring error in the Java compilation process. Find out its causes and ways to resolve...
Read more >
"Cannot Find Symbol" compile error - Net-Informations.Com
What does a Cannot find symbol compilation error mean? The Cannot find symbol errors generally occur when you try to reference an undeclared...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found