매니페스트 코드
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.gcm_test"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:name="com.example.gcm_test.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.example.gcm_test.permission.C2D_MESSAGE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".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>
<receiver
android:name=".GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIV"/>
<category android:name="com.example.gcm_test"/>
</intent-filter>
</receiver>
<service android:name=".GcmIntentService"/>
</application>
</manifest>
///////////////////////////////////////
위는 매니페스트 소스입니다.
로그캣에 뜨는 에러입니다.
manifest에 뜨는거인지는 알고있지만... 어떤게 잘못인지는 잘몰르겠어서
이렇게 질문을 올립니다.
gcm 처음 RegID를 받아오기위해 서버는 안만들고 클라이언트만 만들어서 실행을 시켯는데 이러한 에러가 뜨네요...
*google gcm 예제를 보고 따라 했습니다.
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.gcm_test/com.example.gcm_test.MainActivity}: java.lang.IllegalStateException: A required meta-data tag in your app's AndroidManifest.xml does not exist. 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" />