06-29 17:53:57.031: I/chromium(15345): [INFO:CONSOLE(85114)] "Uncaught TypeError: this._next is not a function", source: file:///android_asset/www/build/js/app.bundle.js (85114)
when try to use
map.on(GoogleMapsEvent.MAP_READY).subscribe(() => { console.log("Map is ready!") });
Here is a bigger problem since today when I do ionic build android in CLI
add to body class: platform-android
Discovered plugin "cordova-plugin-googlemaps" in config.xml. Adding it to the project
Found plugin.google.maps is already fetched. Skipped fetching cordova-plugin-googlemaps
Plugin "plugin.google.maps" already installed on android.
ANDROID_HOME=E:\kit\adt-bundle-windows-x86_64-20140702\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_91
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
>
Could not resolve all dependencies for configuration ':_debugCompile'.
>
Could not find any version that matches com.google.android.gms:play-services-maps:+.
Searched in the following locations:
https://repo1.maven.org/maven2/com/google/android/gms/play-services-maps/maven-metadata.xml
https://repo1.maven.org/maven2/com/google/android/gms/play-services-maps/
Required by:
:android:unspecified
> Could not find any version that matches com.google.android.gms:play-services-location:+.
Searched in the following locations:
https://repo1.maven.org/maven2/com/google/android/gms/play-services-location/maven-metadata.xml
https://repo1.maven.org/maven2/com/google/android/gms/play-services-location/
Required by:
:android:unspecified
* 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.839 secs
Error: Error code 1 for command: cmd with args: /s,/c,"E:\datz_new\DatzApp\DatzMagazine\platforms\android\gradlew cdvBuildDebug -b E:\datz_new\DatzApp\DatzMagazine\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
Caught exception:
undefined
And yes as the pasted log above, after alot of frustration I tried to insert manually the <plugin name="cordova-plugin-googlemaps" spec="~1.3.9"/>
tag in the config.xml file, but with no use and no clue how to debug this/fix it.
If you’re able to reply I will appreciate it very much.
Thank you.
EDIT: Bug fixed after ionic beta 10. No more crash on building for android platform. @mhartington , still after I corrected my code like you mentioned, how do I proceed in order to display a map centered in a specific LatLng coordonate? Thanks again.
There is a functional example here that accounts for the known issue logged in github, this project has been tested and validated by a few people, please clone the project and substitute you keys and see if it works for you.
Yes using the .one() method works but certain use cases can only be achieved using the .on() method. So I guess I need to wait until this gets properly resolved.