Bug 16019 - Google Play Service Rev 12 Android.Views.InflateException
Summary: Google Play Service Rev 12 Android.Views.InflateException
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: Mono runtime / AOT Compiler ()
Version: 4.8.x
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Marek Habersack
URL:
Depends on:
Blocks:
 
Reported: 2013-11-07 17:05 UTC by abul haque
Modified: 2017-08-23 21:29 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Google Play Service (39.08 KB, image/pjpeg)
2013-11-07 17:06 UTC, abul haque
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description abul haque 2013-11-07 17:05:18 UTC
Hi

I am trying to Create an Android Application with Google Map. I am using Google Map API Key V2. I have added Google Play Services Rev 12 in my component folder. When I ran it in the Emulator I got the following unhandled exception.
Desperately I need your help. I have a Xamarin Business account.
------------------------------------------------------------------------------------------------------------
11-07 19:46:23.599 W/monodroid-gc( 7362): GREF GC Threshold: 1800
Loaded assembly: SimpleMapDemo.dll
Loaded assembly: GooglePlayServicesLib.dll
Loaded assembly: Mono.Android.dll [External]
11-07 19:46:25.109 W/Trace   ( 7362): Unexpected value from nativeGetEnabledTags: 0
Loaded assembly: System.Core.dll [External]
Loaded assembly: MonoDroidConstructors [External]
11-07 19:46:27.549 W/ResourceType( 7362): getEntry failing because entryIndex 13 is beyond type entryCount 12
11-07 19:46:27.549 W/ResourceType( 7362): Failure getting entry for 0x7f05000d (t=4 e=13) in package 0 (error -2147483647)
11-07 19:46:27.549 E/GooglePlayServicesUtil( 7362): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
An unhandled exception occured.
11-07 19:46:29.979 I/MonoDroid( 7362): UNHANDLED EXCEPTION: Android.Views.InflateException: Exception of type 'Android.Views.InflateException' was thrown.
11-07 19:46:29.979 I/MonoDroid( 7362): at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue[]) [0x00024] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.2-branch/a25a31d0/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:616
11-07 19:46:29.979 I/MonoDroid( 7362): at Android.App.Activity.SetContentView (int) [0x00070] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.2-branch/a25a31d0/source/monodroid/src/Mono.Android/platforms/android-14/src/generated/Android.App.Activity.cs:3824
11-07 19:46:29.979 I/MonoDroid( 7362): at SimpleMapDemo.BasicDemoActivity.OnCreate (Android.OS.Bundle) [0x00009] in c:\Users\ABULH\Documents\monodroid-samples-master\monodroid-samples-master\MapsAndLocationDemo_v2\SimpleMapDemo\BasicDemoActivity.cs:13
11-07 19:46:29.979 I/MonoDroid( 7362): at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (intptr,intptr,intptr) [0x00011] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.2-branch/a25a31d0/source/monodroid/src/Mono.Android/platforms/android-14/src/generated/Android.App.Activity.cs:1937
11-07 19:46:29.979 I/MonoDroid( 7362): at (wrapper dynamic-method) object.419404b5-c8ce-463f-9a6b-decd4e9cb53f (intptr,intptr,intptr) <IL 0x00017, 0x0001f>
11-07 19:46:29.979 I/MonoDroid( 7362): 
11-07 19:46:29.979 I/MonoDroid( 7362):   --- End of managed exception stack trace ---
11-07 19:46:29.979 I/MonoDroid( 7362): android.view.InflateException: Binary XML file line #1: Error inflating class fragment
11-07 19:46:29.979 I/MonoDroid( 7362): 	at dalvik.system.Nati11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.app.Activity.setContentView(Activity.java:1881)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at simplemapdemo.BasicDemoActivity.n_onCreate(Native Method)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at simplemapdemo.BasicDemoActivity.onCreate(BasicDemoActivity.java:28)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.app.Activity.performCreate(Activity.java:5104)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.app.ActivityThread.access$600(ActivityThread.java:141)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.os.Handler.dispatchMessage(Handler.java:99)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.os.Looper.loop(Looper.java:137)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.app.ActivityThread.main(ActivityThread.java:5039)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at java.lang.reflect.Method.invokeNative(Native Method)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at java.lang.reflect.Method.invoke(Method.java:511)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at dalvik.system.NativeStart.main(Native Method)
11-07 19:46:29.979 I/MonoDroid( 7362): Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4030500 but found 0.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
11-07 19:46:29.979 I/MonoDroid( 7362): 	at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at com.google.android.gms.maps.internal.q.v(Unknown Source)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at com.google.android.gms.maps.internal.q.u(Unknown Source)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at com.google.android.gms.maps.MapFragment$b.cE(Unknown Source)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at com.google.android.gms.maps.MapFragment$b.a(Unknown Source)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at com.google.android.gms.dynamic.a.a(Unknown Source)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.app.Activity.onCreateView(Activity.java:4716)
11-07 19:46:29.979 I/MonoDroid( 7362): 	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
11-07 19:46:29.979 I/MonoDroid( 7362): 	... 22 more
Unhandled Exception:

Android.Views.InflateException: Loading...
11-07 19:46:30.619 W/dalvikvm( 7362): JNI WARNING: JNI method called with exception pending
11-07 19:46:30.619 W/dalvikvm( 7362):              in Lsimplemapdemo/BasicDemoActivity;.n_onCreate:(Landroid/os/Bundle;)V (GetMethodID)
11-07 19:46:30.619 W/dalvikvm( 7362): Pending exception is:
11-07 19:46:30.629 I/dalvikvm( 7362): android.view.InflateException: Binary XML file line #1: Error inflating class fragment
11-07 19:46:30.629 I/dalvikvm( 7362):   (raw stack trace not found)
11-07 19:46:30.629 I/dalvikvm( 7362): Caused by:
11-07 19:46:30.629 I/dalvikvm( 7362): java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4030500 but found 0.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
11-07 19:46:30.642 I/dalvikvm( 7362):   (raw stack trace not found)
11-07 19:46:30.642 I/dalvikvm( 7362): "main" prio=5 tid=1 NATIVE
11-07 19:46:30.642 I/dalvikvm( 7362):   | group="main" sCount=0 dsCount=0 obj=0xb3e05938 self=0xb84a6e80
11-07 19:46:30.642 I/dalvikvm( 7362):   | sysTid=7362 nice=0 sched=0/0 cgrp=[fopen-error:2] handle=-1207267168
11-07 19:46:30.642 I/dalvikvm( 7362):   | state=R schedstat=( 0 0 0 ) utm=324 stm=53 core=0
11-07 19:46:30.889 I/dalvikvm( 7362):   #00  pc 000a16e7  /system/lib/libdvm.so
11-07 19:46:30.889 I/dalvikvm( 7362):   #01  pc 00080d15  /system/lib/libdvm.so
11-07 19:46:30.889 I/dalvikvm( 7362):   #02  pc 00080ee7  /system/lib/libdvm.so
11-07 19:46:30.889 I/dalvikvm( 7362):   #03  pc 00039ceb  /system/lib/libdvm.so
11-07 19:46:30.889 I/dalvikvm( 7362):   #04  pc 0004be86  /system/lib/libdvm.so
11-07 19:46:30.889 I/dalvikvm( 7362):   #05  pc 00004810  <unknown>
11-07 19:46:30.889 I/dalvikvm( 7362):   at simplemapdemo.BasicDemoActivity.n_onCreate(Native Method)
11-07 19:46:30.889 I/dalvikvm( 7362):   at simplemapdemo.BasicDemoActivity.onCreate(BasicDemoActivity.java:28)
11-07 19:46:30.889 I/dalvikvm( 7362):   at android.app.Activity.performCreate(Activity.java:5104)
11-07 19:46:30.889 I/dalvikvm( 7362):   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
11-07 19:46:30.889 I/dalvikvm( 7362):   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
11-07 19:46:30.889 I/dalvikvm( 7362):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
11-07 19:46:30.889 I/dalvikvm( 7362):   at android.app.ActivityThread.access$600(ActivityThread.java:141)
11-07 19:46:30.889 I/dalvikvm( 7362):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
11-07 19:46:30.899 I/dalvikvm( 7362):   at android.os.Handler.dispatchMessage(Handler.java:99)
11-07 19:46:30.899 I/dalvikvm( 7362):   at android.os.Looper.loop(Looper.java:137)
11-07 19:46:30.899 I/dalvikvm( 7362):   at android.app.ActivityThread.main(ActivityThread.java:5039)
11-07 19:46:30.899 I/dalvikvm( 7362):   at java.lang.reflect.Method.invokeNative(Native Method)
11-07 19:46:30.899 I/dalvikvm( 7362):   at java.lang.reflect.Method.invoke(Method.java:511)
11-07 19:46:30.899 I/dalvikvm( 7362):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
11-07 19:46:30.899 I/dalvikvm( 7362):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
11-07 19:46:30.899 I/dalvikvm( 7362):   at dalvik.system.NativeStart.main(Native Method)
11-07 19:46:30.899 I/dalvikvm( 7362): 
11-07 19:46:30.899 E/dalvikvm( 7362): VM aborting
11-07 19:46:30.899 E/mono-rt ( 7362): Stacktrace:
11-07 19:46:30.899 E/mono-rt ( 7362): 
11-07 19:46:30.899 E/mono-rt ( 7362):   at <unknown> <0xffffffff>
11-07 19:46:30.899 E/mono-rt ( 7362):   at (wrapper managed-to-native) object.wrapper_native_0xb72a6e30 (intptr,intptr,string,string) <IL 0x0004c, 0xffffffff>
11-07 19:46:30.910 E/mono-rt ( 7362):   at Android.Runtime.JNIEnv.GetMethodID (intptr,string,string) [0x00000] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.2-branch/a25a31d0/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:118
11-07 19:46:30.910 E/mono-rt ( 7362):   at Java.Lang.Throwable.get_Message () [0x00014] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.8.2-branch/a25a31d0/source/monodroid/src/Mono.Android/platforms/android-14/src/generated/Java.Lang.Throwable.cs:201
11-07 19:46:30.910 E/mono-rt ( 7362):   at (wrapper runtime-invoke) <Module>.runtime_invoke_object__this__ (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>
11-07 19:46:30.910 E/mono-rt ( 7362):   at <unknown> <0xffffffff>
11-07 19:46:30.910 E/mono-rt ( 7362):   at (wrapper dynamic-method) object.419404b5-c8ce-463f-9a6b-decd4e9cb53f (intptr,intptr,intptr) <IL 0x00034, 0x00073>
11-07 19:46:30.910 E/mono-rt ( 7362):   at (wrapper native-to-managed) object.419404b5-c8ce-463f-9a6b-decd4e9cb53f (intptr,intptr,intptr) <IL 0x00023, 0xffffffff>
11-07 19:46:30.910 E/mono-rt ( 7362): 
11-07 19:46:30.910 E/mono-rt ( 7362): =================================================================
11-07 19:46:30.910 E/mono-rt ( 7362): Got a SIGSEGV while executing native code. This usually indicates
11-07 19:46:30.910 E/mono-rt ( 7362): a fatal error in the mono runtime or one of the native libraries 
11-07 19:46:30.910 E/mono-rt ( 7362): used by your application.
11-07 19:46:30.910 E/mono-rt ( 7362): =================================================================
11-07 19:46:30.910 E/mono-rt ( 7362): 
The program 'Mono' has exited with code 0 (0x0).
----------------------------------------------------------------------------------------------------------

BasicDemo.axml file:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <fragment
        android:id="@+id/map"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        class="com.google.android.gms.maps.MapFragment" />
</LinearLayout>


BasicDemoActivity.cs file:
namespace SimpleMapDemo
{
    using Android.App;
    using Android.OS;

    [Activity(Label = "@string/basic_map", MainLauncher = true, Icon = "@drawable/icon")]
    public class BasicDemoActivity : Activity
    {
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.BasicDemo);
        }
    }
}

AndroidManifest.xml file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="ca.nait.naitmobiletest" android:versionCode="1">
  <application android:label="@string/app_name">
    <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBsVSi6iWi9dy0UM9_A_tovrefdDUZFZ8o" />
  </application>
	<uses-sdk android:minSdkVersion="12" />	
  <permission android:name="ca.nait.naitmobiletest.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
  <uses-permission android:name="ca.nait.naitmobiletest.permission.MAPS_RECEIVE" />
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.MAPS_RECEIVE" />
  <uses-permission android:name="android.permission.READ_GSERVICES" />
  <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
  <!-- Google Maps for Android v2 requires OpenGL ES v2 -->
  <uses-feature android:glEsVersion="0x00020000" android:required="true" />
</manifest>
Comment 1 abul haque 2013-11-07 17:06:30 UTC
Created attachment 5364 [details]
Google Play Service
Comment 2 abul haque 2013-11-13 10:23:50 UTC
is there any update for this ticket?
Comment 3 Jonathan Pryor 2013-11-13 10:39:37 UTC
Alex: com.google.android.gms.maps.MapFragment is not being embedded into the app, and MapFragment would be coming from the .jar that the Component pulls in.
Comment 4 abul haque 2013-11-13 10:47:00 UTC
how do I add the MapFragement component in my App. do I need a using statement?
Please let me know.
Comment 5 dean.ellis 2016-09-20 09:37:39 UTC
Is this still an issue? It has not been updated for a few years, and I believe the Google Play components have been updated a few times since this bug was filed.
Comment 6 Cody Beyer (MSFT) 2017-08-23 21:29:14 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!