I am trying to run Google Cloud masseging system , logcat shows me that the metadata is should include android name and android value, which is already exist inside the manifest
3016-3016/com.icanappz.gcmimplementation E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.icanappz.gcmimplementation, PID: 3016
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.icanappz.gcmimplementation/com.icanappz.gcmimplementation.MainActivity}: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 6587000 but found 6171000. 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" />
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 6587000 but found 6171000. 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" />
at com.google.android.gms.common.GooglePlayServicesUtil.D(Unknown Source)
at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
at com.icanappz.gcmimplementation.MainActivity.onCreate(MainActivity.java:112)
at android.app.Activity.performCreate(Activity.java:5933)
that was the logcat and this is the mainfiest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://ift.tt/nIICcg"
package="com.icanappz.gcmimplementation"
android:versionCode="2"
android:versionName="1.1.0" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!-- This app has permission to register and receive data message. -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<!-- Permission to vibrate -->
<uses-permission android:name="android.permission.VIBRATE" />
<!-- Creates a custom permission so only this app can receive its messages. -->
<permission
android:name="com.icanappz.gcmimplementation.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.icanappz.gcmimplementation.permission.C2D_MESSAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/icanTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version"/>
<activity
android:name="com.icanappz.gcmimplementation.MainActivity"
android:theme="@style/Theme.AppCompat.Light"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.icanappz.gcmimplementation.DailogeNotice"
android:theme="@style/AppTheme.Dialog" >
</activity>
<activity
android:name="com.icanappz.gcmimplementation.CustomeWebView"
android:theme="@style/Theme.AppCompat.Light" >
</activity>
<activity
android:name="com.icanappz.gcmimplementation.PreferenceActivity"
android:theme="@style/Theme.AppCompat.Light" >
</activity>
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<receiver
android:name="com.icanappz.gcmimplementation.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<!-- Receives the actual messages. -->
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.icanappz.gcmimplementation" />
</intent-filter>
</receiver>
<service android:name="com.icanappz.gcmimplementation.GcmIntentService" />
</application>
</manifest>
Aucun commentaire:
Enregistrer un commentaire