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

Build issue in multiple maps branch

Open d4ex opened this issue 8 years ago • 4 comments

  • [ ] question

  • [X] any problem or bug report

  • [ ] feature request

  • [X] Android

  • [ ] iOS

We're using ionic. The last commits in the multiple_maps branch produce many build errors.

* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> 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: 2.031 secs
[12:25:28]  lint finished in 3.65 s 
(node:18941) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /tmp/workspace/yourshur/platforms/android/gradlew: Command failed with exit code 1 Error output:
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarker.java:76: error: class PluginMap is public, should be declared in a file named PluginMap.java
public class PluginMap extends MyPlugin implements OnMarkerClickListener,
       ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMap.java:76: error: duplicate class: plugin.google.maps.PluginMap
public class PluginMap extends MyPlugin implements OnMarkerClickListener,
       ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:26: error: cannot find symbol
public class PluginMarkerCluster extends PluginMarker {
                                         ^
  symbol: class PluginMarker
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:43: error: method does not override or implement a method from a supertype
  @Override
  ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:45: error: cannot find symbol
    super.initialize(cordova, webView);
    ^
  symbol:   variable super
  location: class PluginMarkerCluster
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:51: error: method does not override or implement a method from a supertype
  @Override
  ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:53: error: cannot find symbol
    super.onDestroy();
    ^
  symbol:   variable super
  location: class PluginMarkerCluster
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:57: error: method does not override or implement a method from a supertype
  @Override
  ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:59: error: cannot find symbol
    super.clear();
    ^
  symbol:   variable super
  location: class PluginMarkerCluster
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:93: error: cannot find symbol
        cordova.getActivity().runOnUiThread(removeOverlaysOnUiThread);
        ^
  symbol: variable cordova
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:111: error: cannot find symbol
          marker = self.getMarker(markerId);
                   ^
  symbol: variable self
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:116: error: cannot find symbol
              synchronized (pluginMap.objects) {
                            ^
  symbol: variable pluginMap
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:116: error: illegal start of type
              synchronized (pluginMap.objects) {
                           ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:117: error: cannot find symbol
                _removeMarker(marker);
                ^
  symbol: method _removeMarker(Marker)
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:120: error: package pluginMap does not exist
                cacheKey = (String) pluginMap.objects.remove("marker_icon_" + markerId);
                                             ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:121: error: cannot find symbol
                if (cacheKey != null && iconCacheKeys.containsKey(cacheKey)) {
                                        ^
  symbol: variable iconCacheKeys
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:122: error: cannot find symbol
                  int count = iconCacheKeys.get(cacheKey);
                              ^
  symbol: variable iconCacheKeys
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:124: error: cannot find symbol
                    iconCacheKeys.remove(cacheKey);
                    ^
  symbol: variable iconCacheKeys
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:127: error: cannot find symbol
                    iconCacheKeys.put(cacheKey, count - 1);
                    ^
  symbol: variable iconCacheKeys
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:132: error: package pluginMap does not exist
                pluginMap.objects.remove(markerId);
                         ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:133: error: package pluginMap does not exist
                pluginMap.objects.remove("marker_property_" + markerId);
                         ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:134: error: package pluginMap does not exist
                pluginMap.objects.remove("marker_imageSize_" + markerId);
                         ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:272: error: package pluginMap does not exist
      pluginMap.objects.put("marker_property_" + clusterId_markerId, clusterData);
               ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:377: error: package pluginMap does not exist
          isNew = !pluginMap.objects.containsKey(clusterId_markerId);
                            ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:387: error: package pluginMap does not exist
              JSONObject properties = (JSONObject) pluginMap.objects.get("marker_property_" + clusterId_markerId);
                                                            ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:389: error: cannot find symbol
                _create(clusterId_markerId, properties, new ICreateMarkerCallback() {
                                                            ^
  symbol: class ICreateMarkerCallback
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:421: error: cannot find symbol
              marker = getMarker(clusterId_markerId);
                       ^
  symbol: method getMarker(String)
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:433: error: cannot find symbol
                  _removeMarker(marker);
                  ^
  symbol: method _removeMarker(Marker)
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:448: error: cannot find symbol
            marker = map.addMarker(new MarkerOptions()
                     ^
  symbol: variable map
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:454: error: cannot find symbol
            synchronized (pluginMap.objects) {
                          ^
  symbol: variable pluginMap
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:454: error: illegal start of type
            synchronized (pluginMap.objects) {
                         ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:455: error: package pluginMap does not exist
              pluginMap.objects.put(clusterId_markerId, marker);
                       ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:458: error: cannot find symbol
            marker = getMarker(clusterId_markerId);
                     ^
  symbol: method getMarker(String)
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:500: error: cannot find symbol
                Log.e(TAG, errorMsg);
                      ^
  symbol: variable TAG
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:354: error: cannot find symbol
    cordova.getActivity().runOnUiThread(new Runnable() {
    ^
  symbol:   variable cordova
  location: class PluginMarkerCluster
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:541: error: cannot find symbol
    cordova.getThreadPool().submit(new Runnable() {
    ^
  symbol:   variable cordova
  location: class PluginMarkerCluster
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:590: error: cannot find symbol
        synchronized (pluginMap.objects) {
                      ^
  symbol:   variable pluginMap
  location: class PluginMarkerCluster
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:590: error: illegal start of type
        synchronized (pluginMap.objects) {
                     ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:591: error: cannot find symbol
          PluginMarkerCluster.this._removeMarker(marker);
                                  ^
  symbol: method _removeMarker(Marker)
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:592: error: package pluginMap does not exist
          pluginMap.objects.remove(markerId);
                   ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:593: error: package pluginMap does not exist
          pluginMap.objects.remove("marker_property_" + markerId);
                   ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:606: error: cannot find symbol
            synchronized (pluginMap.objects) {
                          ^
  symbol: variable pluginMap
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:606: error: illegal start of type
            synchronized (pluginMap.objects) {
                         ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:607: error: cannot find symbol
              PluginMarkerCluster.this._removeMarker(marker);
                                      ^
  symbol: method _removeMarker(Marker)
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:608: error: package pluginMap does not exist
              pluginMap.objects.remove(markerId);
                       ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:609: error: package pluginMap does not exist
              pluginMap.objects.remove("marker_property_" + markerId);
                       ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:625: error: cannot find symbol
        synchronized (pluginMap.objects) {
                      ^
  symbol: variable pluginMap
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:625: error: illegal start of type
        synchronized (pluginMap.objects) {
                     ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:627: error: cannot find symbol
            PluginMarkerCluster.this._removeMarker(marker);
                                    ^
  symbol: method _removeMarker(Marker)
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:629: error: package pluginMap does not exist
          pluginMap.objects.remove(markerId);
                   ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:630: error: package pluginMap does not exist
          pluginMap.objects.remove("marker_property_" + markerId);
                   ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:632: error: package pluginMap does not exist
          pluginMap.objects.remove(markerId);
                   ^
/tmp/workspace/yourshur/platforms/android/src/plugin/google/maps/PluginMarkerCluster.java:600: error: not an enclosing class: PluginMarkerCluster
    PluginMarkerCluster.super.setIcon_(marker, iconProperty, new PluginAsyncInterface() {

d4ex avatar Jan 24 '18 11:01 d4ex

provisional solution: switch to commit before changes: "cordova-plugin-googlemaps": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps.git#979ecf4cab42f6daecca5caa5bbf75c9e05c5a46",

d4ex avatar Jan 24 '18 11:01 d4ex

It seems the content of PluginMap.java was copied to PluginMarker.java by the last commit. The commit before that works.

battika avatar Jan 24 '18 11:01 battika

Fixed

wf9a5m75 avatar Jan 24 '18 15:01 wf9a5m75

@wf9a5m75 how can I do cordova plugin add cordova-plugin-googlemaps in a cordova project targeting the multiple maps branch? Thanks

MaxInMoon avatar Jan 29 '18 02:01 MaxInMoon