I do not know at all.. I use the various methods are not resolved
07-18 15:09:15.697: E/AndroidRuntime(22016): FATAL EXCEPTION: main
07-18 15:09:15.697: E/AndroidRuntime(22016): java.lang.RuntimeException: Unable to start activity ComponentInfo{kr.co.crooz.plugin.googleplustestplugin/kr.co.crooz.plugin.googleplustestplugin.AndroidGooglePlus}: 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" />
07-18 15:09:15.697: E/AndroidRuntime(22016): at dalvik.system.NativeStart.main(Native Method)
07-18 15:09:15.697: E/AndroidRuntime(22016): Caused by: 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" />
AndroidGooglePlus.java onCreate(Bundle savedInstanceState) in code
setContentView(R.layout.activity_main)
Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="kr.co.crooz.plugin.googleplustestplugin"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="kr.co.crooz.plugin.googleplustestplugin.AndroidGooglePlus"
android:label="@string/app_name"
android:configChanges="orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</activity>
</application>
</manifest>
I need help. please.
meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"
Although the code is still an error occurs.
You need to move <meta-data>
tag outside <activity>
tag and inside <application>
tag.
Like so.
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
>
<activity
......
......
</activity>
<meta-data android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</application>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.