AS + gradle: The Google Play services resources were not found.

4,443 views
Skip to first unread message

Aleksander Piotrowski

unread,
Aug 3, 2013, 10:31:54 AM8/3/13
to adt...@googlegroups.com
i'm using google maps for android and i just started receiving following error message:

E/GooglePlayServicesUtil(18802): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

i'm pretty sure my app worked fine before and all that has changed recently was AS updated to 0.2.3

just checked:
 - got all recent sdk updates
 - .aar files are present in android-sdk/extras/google/m2repository/com/google/android/gms/play-services/

of course, i'm building project with gradle, and here is my build.gradle file.
like i said, project builds just fine -- i got this error at run-time.

any idea?

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.5.5'
    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.android.support:support-v4:13.0.+'
compile 'com.google.android.gms:play-services:3.1.36'
compile project(':facebook-sdk-3.0.2')
compile files('libs/gson-2.2.4.jar')
compile files('libs/retrofit-1.0.2.jar')
compile files('libs/Parse-1.3.1.jar')
compile files('libs/picasso-1.1.1.jar')
}

android {
    compileSdkVersion 18
    buildToolsVersion "18.0.1"

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 18
    }
}



César Díez Sánchez

unread,
Aug 6, 2013, 1:54:40 PM8/6/13
to adt...@googlegroups.com
Same problem here. I'm using last ADT + Gradle + Android Studio:

My map doesn't show properly... (and my debug key is ok, and I've set everything ok...)

19:47:00.376    2141-2141/com.menor.android.assignment.tempos21 E/GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
08-06 19:47:32.290  31647-31647/? E/Babel: ImageLoader.load: invalid request: null

Maybe it's because the new Google Play Services bug?

Victor Borsoi

unread,
Aug 7, 2013, 10:33:46 AM8/7/13
to adt...@googlegroups.com
Same problem on my app.

Jalal Albasri

unread,
Aug 15, 2013, 1:35:30 AM8/15/13
to adt...@googlegroups.com
I have the exact same issue. My build.gradle file looks just like yours. Not sure what is wrong or how to fix it since this worked fine prior to my upgrade of Android Studio 0.2.4

Davy De Waele

unread,
Aug 19, 2013, 10:48:20 AM8/19/13
to adt...@googlegroups.com
FYI, I'm getting the same issue on Eclipse/ADT/Maven so most likely a Play Services issue.

Christoffer Hirsimaa

unread,
Aug 20, 2013, 5:29:12 AM8/20/13
to adt...@googlegroups.com
I have the same problem with latest ADT+Android Studio+Gradle and what I believe is latest Google Play services as well (3.1.36)

Egor N

unread,
Aug 23, 2013, 4:18:16 AM8/23/13
to adt...@googlegroups.com
Gettings the same error with Android Studio 0.2.4 and last google play services (3.2.25).

суббота, 3 августа 2013 г., 17:31:54 UTC+3 пользователь Aleksander Piotrowski написал:

David Edelstein

unread,
Aug 25, 2013, 9:49:53 PM8/25/13
to adt...@googlegroups.com
I'm having the same error on Android Studio 0.2.5

igor ganapolsky

unread,
Sep 5, 2013, 1:48:44 AM9/5/13
to adt...@googlegroups.com
Same problem here.  Updated my Android Studio to the latest (0.2.6).  Rebuilt project many times.  Getting this error on all versions of android (2.2 - 4.3).

Xavier Ducrohet

unread,
Sep 5, 2013, 2:18:52 PM9/5/13
to adt...@googlegroups.com
Can you look in your apk and make sure the play services resources are in there?

for instance if should have res/drawable-hdpi/common_signin_btn_text_focus_dark.9.png


--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

bsgwi...@gmail.com

unread,
Sep 10, 2013, 11:09:38 AM9/10/13
to adt...@googlegroups.com
Hi Xavier,

Seen the same issue using the Eclipse debugger.

Getting this warning before the above mentioned message.

09-10 15:58:45.345: W/ResourceType(12382): Failure getting entry for 0x7f0b038a (t=10 e=906) in package 0 (error -2147483647)

Now I have had a look in the R.java file for the library and I see no resource that uses this ID.

I think this is where things are going wrong, looks like you may be doing a search on the resources dynamically, but are unable to find the referenced file.

These guys seem to be seeing the same resource code error. 

prefer not to

unread,
Oct 22, 2013, 11:41:07 PM10/22/13
to adt...@googlegroups.com
Same error message. Never had this problem, project working fine and then suddenly this. I've spent days trying to resolve this to no avail. The error message can be removed by disabling the my location source, however bugs remain without error messages.

My use of the Google Maps API involves adding polygons to the GoogleMap. The bug that I am experiencing is that polygons added to the map will sporadically drop from the map after scrolling around a variable amount.

I am experiencing this issue on both my Nexus One and Nexus 4, stock Android. I have updated *all* applications on both of these devices and tried the "allow google location access" trick to no avail (removed error message, disappearing polygons continue). I have removed and reinstalled all necessary packages from the Android SDK manager, still no luck. GooglePlayServicesUtil.isGooglePlayServicesAvailable() returns 0 (success) on both devices.

All in all I've put 30+ hours personal time into debugging this problem, the app I am developing is open source and will be free on the app store, I simply cannot continue work on this app as is-- I am stuck.

Zsolt Sáfrány

unread,
Nov 25, 2013, 11:05:09 AM11/25/13
to adt...@googlegroups.com
@Xavier: I have the same issue and I just checked my apk. It contains a lot of common_signin_btn_*.png files. 

Which is not surprising for me as the +1 button shows up properly in my app. But the "E/GooglePlayServicesUtil﹕ The Google Play services resources were not found. Check your project configuration to ensure that the resources are included." log entry and the issue is still there.

Alan Jeon

unread,
Dec 12, 2013, 12:10:09 AM12/12/13
to adt...@googlegroups.com
In Gms aar library, R.txt has R.string.common_google_play_services_unknown_issue resource id with 0x7f0b000d .
When it compiled to build apk can be changed to apk specific id by aapt. (In my case, it changed to 0x7f0a0020)
However gms.apk still uses hard-coded resource id(0x7f0b000d) (I dedexed com.google.android.gms.apk package)


I think it's google's problem. :)

Xavier Ducrohet

unread,
Dec 12, 2013, 1:07:40 AM12/12/13
to adt...@googlegroups.com
Are you comparing a resource in the aar to a resource in the device side apk? The resource may have the same name but it's not used across apks (the app using play services and the play services apk)

The resource in the aar gets a final ID when compiled in the app. The value in the R.txt in the aar doesn't actually matter.
If you look at the Java code packaged in the aar, you'll see that access to this value is not inlined in code but uses field access on the R class of the aar.

When the apk (using Play services) is packaged the app uses it own internal resources (coming from the aar) with the new ID.


--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Alan Jeon

unread,
Dec 12, 2013, 3:20:24 AM12/12/13
to adt...@googlegroups.com
That's right. I thought play services apk was trying to read app's resources somewhere.
Then what makes this strange error message? hm.. 





2013/12/12 Xavier Ducrohet <x...@android.com>

--
You received this message because you are subscribed to a topic in the Google Groups "adt-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/adt-dev/dLbwDe9_IHk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to adt-dev+u...@googlegroups.com.

Adam Brown

unread,
Dec 12, 2013, 7:41:17 PM12/12/13
to adt...@googlegroups.com
I had a similar problem, I think the Google play services aar depends on the v7 compat aar:

compile 'com.android.support:appcompat-v7:+'
compile 'com.google.android.gms:play-services:4.0.30'

I'm pretty sure both are required.

Kevin Mark

unread,
Dec 16, 2013, 2:02:30 AM12/16/13
to adt...@googlegroups.com
I'm using both support-v4 and appcompat-v7 in my build and I'm still plagued by the same error. Oddly enough, nothing in my app appears to be broken. Including in-app billing.

Adam Brown

unread,
Dec 16, 2013, 1:01:57 PM12/16/13
to adt...@googlegroups.com
Hhmmm, ya I was seeing the exact same symptoms with in-app billing, but adding appcompat-v7 fixed it for me.


Kevin Mark

unread,
Dec 25, 2013, 8:34:57 PM12/25/13
to adt...@googlegroups.com
Did it fix the error message in your log or fix the symptoms (ie: things not working). So far, for me, everything seems to be working properly except for the fact that it's pushing an error message to the log every once in awhile.

Adam Brown

unread,
Dec 25, 2013, 8:37:51 PM12/25/13
to adt...@googlegroups.com
Ya I had the same symptoms. Error in the logs, but everything was working. After adding appcompatv7 it fixed the error in the logs as well.

Kevin Mark

unread,
Dec 25, 2013, 8:45:39 PM12/25/13
to adt...@googlegroups.com

I have the latest version of support v4, appcompat v7, and play services compiling via gradle sequentially and I'm still getting the error. Are you compiling in the same order?

Adam Brown

unread,
Dec 25, 2013, 8:48:21 PM12/25/13
to adt...@googlegroups.com
This is the relevant part of my gradle file:

dependencies {
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.android.support:support-v13:+'
    compile 'com.google.android.gms:play-services:4.0.30'
    compile 'com.google.code.gson:gson:2.2.4'
    compile 'com.android.support:support-v4:18.0.0'
  
   ,,,
}

Kevin Mark

unread,
Dec 25, 2013, 9:20:18 PM12/25/13
to adt...@googlegroups.com
Tried your exact order with no results. It looks like the problem isn't related to build order. This has to be related to Android Studio's build process when handling AAR files with R.txt resources. Removed the native library build code I was using to include compiled .so files. No effect. Very odd.
Reply all
Reply to author
Forward
0 new messages