hello i am quite new to Android development and i want to learn how to use the google Maps API v2. After trying numerous tutorials, i always seem to have a problem with the goog
if your giving google-Play-Service-lib as a references to your project , try to keep your project and the Google-play services lib should be in same drive.
if your project is on C: drive means place Google-play-services-lib in C:
The important thing in adding a library in eclipse is to remember that your project and the library project need to be in the same workspace.
To solve this follow below ways,
You can copy the google-play-services
library project to the same workspace where your main project is there.
else
While importing the library to eclipse remember to check copy projects into workspace
which will add a copy of the library to your workspace.
I see a red "X" and a question mark under "project" instead of the green tick.
The problem is -
The path to your google play services library
is not same as the path to your project. It is outside of your project. And so is not recognized by simple import.
Solution - Put the library in the project's libs
folder.
NOTE: Just putting the library to the libs
folder is not enough.
After you added your library follow these steps -
1) Go to Project -> Properties -> Java Build Path -> Libraries -> Add JARs..
2) Now add your recently added jar to the build path from JAR selection process.
3) Go to Project -> Properties -> Java Build Path -> Order and Export
.
4) Put a tick mark in the check box against this library name and press OK.
5) Do Project -> Clean
.
While making the copy of the entire folder libproject
containing google-play-services_lib
from eclipse import project by selecting the copied libproject
folder in your working place.
For the rest follow the steps in Setting Up Google Play Services
Eclipse
<android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/
to the location where you maintain your Android app projects.
File > Import, select Android > Existing Android Code into Workspace
and browse to the copy of the library project to import it.
manifest file
and add the following tag as a child of the <application>
element:< meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
Android Studio
build.gradle
file inside your application module directory. ... dependencies { compile 'com.google.android.gms:play-services:9.2.0' } apply plugin: 'com.android.application'
Source developers.google.com