0

I have an android project which developed in eclipse which using google play services Now I have migrated that project in android studio. When i run this project it shows an error

Error:(49, 35) java: package com.google.android.gms.maps does not exist

In sdk Google Play services was missing then i installed Google Play services Google Repository

But same error occurring

I referred some questions on stackoverflow like Import Google Play Services library in Android Studio

they are saying you dont need to import any library project just configure your build.gradle file

But as the project imported from eclipse to android studio i cant see build.gradle file here

Community
  • 1
  • 1
vijay
  • 123
  • 1
  • 3
  • 15

1 Answers1

0

Right click on your project > open module setting > select App > dependencies > click on plus button > add library dependencies > googleplayservices

OR Add this in your gradle file dependencies {... compile 'com.google.android.gms:play-services:6.5.87'...} then build again

Ammar ali
  • 1,503
  • 1
  • 15
  • 24
  • I tried with your first option : project > open module setting > select App > dependencies > click on plus button > add library dependencies > but google play services library is not listed in my projects libs folder – vijay Mar 24 '15 at 07:38
  • but still error is present.OK could you tell me where gradle file located if you migrated from eclipse to android studio – vijay Mar 24 '15 at 08:54
  • How did you import your project to android studio did you make it gradle compatible – Ammar ali Mar 24 '15 at 08:56
  • In Android Studio, close any projects currently open. You should see the Welcome to Android Studio window. Click Import Non-Android Studio project. Then locate your project and click ok. – vijay Mar 24 '15 at 09:09
  • https://developer.android.com/sdk/installing/migrate.html. I referred this documentation. but i have only source code from eclipse. my project is not exported from eclipse.Is I have to export project from eclipse to generate gradle files – vijay Mar 24 '15 at 09:11