0

My main problem is "When i start run genymotion(google nexus 7-4.2.2-API 17) it is crashed"!

I am trying google Maps V2.But i can not understand where my problem.Emulator did not run.Then i try Genymotion but it also crashed.I have no real device.please help me!!

my LogCat is here:

05-14 16:33:14.321: E/Trace(1011): error opening trace file: No such file or directory (2)
05-14 16:33:14.901: D/AndroidRuntime(1011): Shutting down VM
05-14 16:33:14.901: W/dalvikvm(1011): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
05-14 16:33:14.921: E/AndroidRuntime(1011): FATAL EXCEPTION: main
05-14 16:33:14.921: E/AndroidRuntime(1011): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.googlemapsdemo/com.example.googlemapsdemo.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.app.ActivityThread.access$600(ActivityThread.java:141)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.os.Looper.loop(Looper.java:137)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.app.ActivityThread.main(ActivityThread.java:5041)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at java.lang.reflect.Method.invokeNative(Native Method)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at java.lang.reflect.Method.invoke(Method.java:511)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at dalvik.system.NativeStart.main(Native Method)
05-14 16:33:14.921: E/AndroidRuntime(1011): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.app.Activity.setContentView(Activity.java:1881)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.example.googlemapsdemo.MainActivity.onCreate(MainActivity.java:13)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.app.Activity.performCreate(Activity.java:5104)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
05-14 16:33:14.921: E/AndroidRuntime(1011):     ... 11 more
05-14 16:33:14.921: E/AndroidRuntime(1011): Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 4323000 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" />
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.google.android.gms.common.GooglePlayServicesUtil.t(Unknown Source)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.google.android.gms.maps.internal.q.B(Unknown Source)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.google.android.gms.maps.internal.q.A(Unknown Source)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.google.android.gms.maps.MapFragment$b.gW(Unknown Source)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.google.android.gms.maps.MapFragment$b.a(Unknown Source)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.google.android.gms.dynamic.a.a(Unknown Source)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.app.Activity.onCreateView(Activity.java:4716)
05-14 16:33:14.921: E/AndroidRuntime(1011):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
05-14 16:33:14.921: E/AndroidRuntime(1011):     ... 20 more

my AndroidMainfast.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.googlemapsdemo"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />
    <permission android:name="com.example.googlemapsdemo.permission.MAPS_RECEIVE" 
        android:protectionLevel="signature">    
     </permission>
    <uses-permission android:name="com.example.googlemapsdemo.permission.MAPS_RECEIVE"/>
    <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.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>

    <uses-feature android:glEsVersion="0x00020000"
        android:required="true"/>

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.googlemapsdemo.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>


        <meta-data 
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSyCNC8bK6mXRPemYKCMjM3_8vrwCi4Lno-s"
            />

    </application>

</manifest>

2 Answers2

0

Add these lines in your manifest file-

<meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />

Steps to install GApps on Genymotion-

1.Download the two zip files from the link ARM Translation Installer v1.1 - http://goo.gl/JBQmPa and Google Apps for Android 4.2 - http://goo.im/gapps/gapps-jb-20130812-signed.zip

2.Then please copy these files to desktop

3.Open genymotion emulator and go to home screen then from the desktop drag and drop the first file Genymotion-ARM-Translation_v1.1.zip .A dialog will appear ans show as file transfer in progress ,then another dialog will appear and ask that do you want to flash it on the emulator then click OK and reboot the device or restart adb .

4.After this drag and drop the second file gapps-jb-20130812-signed.zip and repeat the same steps as above. restart adb and this will install google apps on your emulator.

amit singh
  • 1,407
  • 2
  • 16
  • 25
0

Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4323000 but found 0. You must have the following declaration within the element:

Missing a meta-tag in your application tag of manifest

 ...// rest of the code
 <meta-data 
    android:name="com.google.android.maps.v2.API_KEY"
    android:value="AIzaSyCNC8bK6mXRPemYKCMjM3_8vrwCi4Lno-s"
 />
 <meta-data
  android:name="com.google.android.gms.version"
  android:value="@integer/google_play_services_version" />
</application>

Also you don't require

<permission android:name="com.example.googlemapsdemo.permission.MAPS_RECEIVE" 
    android:protectionLevel="signature">    
</permission>
<uses-permission android:name="com.example.googlemapsdemo.permission.MAPS_RECEIVE"/>
Raghunandan
  • 132,755
  • 26
  • 225
  • 256