Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Maps error on latest Forms + Forms.Maps build

$
0
0

I'm using 1.3.1.0 Forms and Forms.Maps and just can't get the maps working :( Started an app from scratch. Here is my AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.thehappiesthour.app.android" android:installLocation="auto">
    <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="21" />
    <application android:label="Happiest Hour" android:icon="@drawable/Icon">
        <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="NEW API KEY" />
        <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
    </application>
    <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="19" />
    <uses-feature android:glEsVersion="0x00020000" android:required="true" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="com.thehappiesthour.app.android.permission.MAPS_RECEIVE" />
    <permission android:name="com.thehappiesthour.app.android.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
    <!-- <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> -->
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
</manifest>

I keep getting an error regarding CameraUpdateFactory. I've had a similar project run fine on older versions (1.2), and have regenerated a unique SHA1 key for the Google API. Only error from the log is:

[Google Maps Android API] Google Play services client version: 6587000
[Google Maps Android API] Google Play services package version: 6594036
[dalvikvm-heap] Grow heap (frag case) to 10.064MB for 1127532-byte allocation
[EGL_emulation] eglSurfaceAttrib not implemented

Here is the stack:

System.Diagnostics.Debugger.Mono_UnhandledException (ex={Java.Lang.NullPointerException: Exception of type 'Java.Lang.NullPointerException' was thrown.
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <IL 0x00011, 0x00047>
at Android.Runtime.JNIEnv.CallStaticObjectMethod (intptr,intptr,Android.Runtime.JValue[]) [0x00064] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.21-series/49a04b96/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:1161
at Android.Gms.Maps.CameraUpdateFactory.NewLatLngBounds (Android.Gms.Maps.Model.LatLngBounds,int) <IL 0x00061, 0x001b3>
at Xamarin.Forms.Maps.Android.MapRenderer.MoveToRegion (Xamarin.Forms.Maps.MapSpan,bool) <IL 0x000b9, 0x00483>
at Xamarin.Forms.Maps.Android.MapRenderer.OnLayout (bool,int,int,int,int) <IL 0x00027, 0x000cf>
at Xamarin.Forms.Platform.Android.FormsViewGroup.n_OnLayout_ZIIII (intptr,intptr,bool,int,int,int,int) <IL 0x00012, 0x00083>
at (wrapper dynamic-method) object.b371fe21-5eab-4b0c-a69c-760111485a51 (intptr,intptr,bool,int,int,int,int) <IL 0x0002f, 0x0004b>

--- End of managed exception stack trace ---
java.lang.NullPointerException: CameraUpdateFactory is not initialized
    at com.google.android.gms.internal.jx.b(Unknown Source)
    at com.google.android.gms.maps.CameraUpdateFactory.nB(Unknown Source)
    at com.google.android.gms.maps.CameraUpdateFactory.newLatLngBounds(Unknown Source)
    at xamarin.forms.maps.android.MapRenderer.n_onLayout(Native Method)
    at xamarin.forms.maps.android.MapRenderer.onLayout(MapRenderer.java:46)
    at android.view.View.layout(View.java:14817)
    at android.view.ViewGroup.layout(ViewGroup.java:4631)
    at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:29)
    at xamarin.forms.platform.android.VisualElementRenderer_1.n_onLayout(Native Method)
    at xamarin.forms.platform.android.VisualElementRenderer_1.onLayout(VisualElementRenderer_1.java:46)
    at android.view.View.layout(View.java:14817)
    at android.view.ViewGroup.layout(ViewGroup.java:4631)
    at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:29)
    at xamarin.forms.platform.android.VisualElementRenderer_1.n_onLayout(Native Method)
    at xamarin.forms.platform.android.VisualElementRenderer_1.onLayout(VisualElementRenderer_1.java:46)
    at android.view.View.layout(View.java:14817)
    at android.view.ViewGroup.layout(ViewGroup.java:4631)
    at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:29)
    at xamarin.forms.platform.android.VisualElementRenderer_1.n_onLayout(Native Method)
    at xamarin.forms.platform.android.VisualElementRenderer_1.onLayout(VisualElementRenderer_1.java:46)
    at android.view.View.layout(View.java:14817)
    at android.view.ViewGroup.layout(ViewGroup.java:4631)
    at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:29)
    at xamarin.forms.platform.android.NavigationRenderer.n_onLayout(Native Method)
    at xamarin.forms.platform.android.NavigationRenderer.onLayout(NavigationRenderer.java:46)
    at android.view.View.layout(View.java:14817)
    at android.view.ViewGroup.layout(ViewGroup.java:4631)
    at com.xamarin.forms.platform.android.FormsViewGroup.measureAndLayout(FormsViewGroup.java:29)
    at xamarin.forms.platform.android.PlatformRenderer.n_onLayout(Native Method)
    at xamarin.forms.platform.android.PlatformRenderer.onLayout(PlatformRenderer.java:62)
    at android.view.View.layout(View.java:14817)
    at android.view.ViewGroup.layout(ViewGroup.java:4631)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
    at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1660)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1436)
    at android.view.View.layout(View.java:14817)
    at android.view.ViewGroup.layout(ViewGroup.java:4631)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
    at android.view.View.layout(View.java:14817)
    at android.view.ViewGroup.layout(ViewGroup.java:4631)
    at com.android.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:374)
    at android.view.View.layout(View.java:14817)
    at android.view.ViewGroup.layout(ViewGroup.java:4631)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
    at android.view.View.layout(View.java:14817)
    at android.view.ViewGroup.layout(ViewGroup.java:4631)
    at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:1987)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1744)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5670)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
    at android.view.Choreographer.doCallbacks(Choreographer.java:574)
    at android.view.Choreographer.doFrame(Choreographer.java:544)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5017)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
    at dalvik.system.NativeStart.main(Native Method)

Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>