0

I am creating a google map application and I want to view my output on an emulator and I am developing using android studio version (beta)0.8.6. I have updated my sdk and installed all the necessary packages including google play services, google play repository and google apis for jelly beans 4.4.2 api level 17. But then again it shows :" This app wont run unless you update google play services".

this is my build .gradle:

 dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:20.+'
    compile 'com.google.android.gms:play-services:5.2.08'
}

and it shows me this message in logcat:

Assertion failed: for not generated items old indentation must be defined: element PsiElement(new line)

Please help me I am stuck on it for days.

pawar
  • 70
  • 2
  • 11

1 Answers1

0

I also had a lot of trouble with that. Look in your device or emulator and see which version of Google Play Services you are using. I had version 5.0.89 on all my devices. If you don't have Google Play Services, install the google apps (gapps) on your emulator or use a real device.

try changing this line

compile 'com.google.android.gms:play-services:5.2.08'

to

compile 'com.google.android.gms:play-services:5.0.89'

That helped for me.
(for some reason my build.gradle changed 5.0.89 to 5.2.08 again and it still works...)

related question with possible answers: play services update required
Here is another example where it worked: After update - crash com.google.android.gms:play-services:5.2.8

Community
  • 1
  • 1
miva2
  • 2,111
  • 25
  • 34
  • I tried it bro @miva2 but it didn't work then I tried installing google play services on my emulator using a browser of my own emulator but then again it stopped. – pawar Oct 09 '14 at 05:15
  • @user3490068 If you have a google Play Store on your emulator and you can successfully download and install apps from the store then I think your emulator should be fine. If not, try to fix that first. Which emulator do you use? If you are using Genymotion, follow [this guide] (http://forum.xda-developers.com/showthread.php?t=2528952) to install google apps. There should be similar guides for other emulators. Then go to Settings > Apps and locate Google Play Services. (Your list of apps might be located somewhere else if you use a different android version) – miva2 Oct 09 '14 at 15:16
  • I am using default emulator of adt eclipse. – pawar Oct 10 '14 at 05:14
  • @user3490068 That should be the default android emulator (which is very slow, I suggest Genymotion. There are more emulators available too. But the default works too.) The easiest solution is to use a real device. Otherwise, install the google apps (commonly referred to as gapps) on your virtual device (you need to do it on every device in your emulator, if you use more than one). Find a guide that works for you here http://bit.ly/1sk6CZa After that, try my initial answer again. – miva2 Oct 10 '14 at 11:43
  • as for Genymotion, this solution helped me https://github.com/thecodepath/android_guides/wiki/Google-Maps-Fragment-Guide – Anton Holovin Oct 10 '14 at 12:05