Ashok
Ashok

Reputation: 611

The Google Play services resources were not Found error

I'm trying one of the example for Push notifications in android App with API 19. Here is my AndroidManifest.xml file:

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

    <uses-sdk
        android:minSdkVersion="19"
        android:targetSdkVersion="21" />

    <uses-permission android:name="android.permission.INTERNET" />
    <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="android.permission.VIBRATE" />
    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="com.example.jsonclient.permission.C2D_MESSAGE" />
````    <permission
        android:name="com.example.jsonclient.permission.C2D_MESSAGE"
        android:protectionLevel="signature" />

    <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>
        <activity
            android:name=".HomeActivity"
            android:label="@string/title_activity_home" >
        </activity>

        <receiver
            android:name=".GcmBroadcastReceiver"
            android:permission="com.google.android.c2dm.permission.SEND" >
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />

                <category android:name="" />
            </intent-filter>
        </receiver>

        <service android:name=".GcmIntentService" />
    </application>

</manifest>

Here I added Google Play Services library : enter image description here

enter image description here

Here is my SDK Manager with Google Play Services. enter image description here When executing method

checkPlayServices

I got Error :

The Google Play services resources were not Found. Check your project configuration to ensure that the resources are included.

Upvotes: 0

Views: 7830

Answers (2)

tyczj
tyczj

Reputation: 74066

You cannot only import the .jar file, you need to import the entire library which includes all its resource files.

Please read the documentation on how to setup google play services.

https://developers.google.com/android/guides/setup

Also eclipse is no longer supported move to Android Studio and things will be a lot easier when importing google play services

Upvotes: 1

Aakash
Aakash

Reputation: 5261

Go to android-sdk folder in your system then extras->google->google_play_services->libproject-> google-play-services_lib

Import google-play-services_lib in your workspace and then add this library project to your own project. Your issue will be hopefully resolved.

Upvotes: 2

Related Questions