0

So i followed this guide https://developers.google.com/maps/documentation/android-api/signup

and created a new Google Developer Console project in here https://console.developers.google.com/home

I put my Eclipse project package name and got the Google Key.

Now as the guide said i added this to my manifest

 <meta-data
    android:name="com.google.android.geo.API_KEY"
    android:value="YOUR_API_KEY"/>

and after i did that i have got a lot of errors in my project and there's also an red exclamation mark near all of my projects of this workspace.

So what I'm doing wrong? I just want to start develop using google play. And please, i read all the guides in their and eclipse's and i still can't get it to go.

EDIT I think i might missed the google play services library. I cant find where to download it.

manifest: as requested.

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

    <uses-sdk
        android:minSdkVersion="11"
        android:targetSdkVersion="23" />

     <uses-permission 
        android:name="android.permission.ACCESS_FINE_LOCATION"/>
    <uses-permission 
        android:name="android.permission.INTERNET"/>
    <uses-permission 
        android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <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=".MyLocation"
            android:label="@string/title_activity_my_location" >
        </activity>

        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="AIzaSyCzVDpAckc5p3DGRIJsco-CyIiFfjgn--k />

    </application>

</manifest>

Like in the guides the <meta data /> is in the application tag.

God
  • 1,238
  • 2
  • 18
  • 45

3 Answers3

1

To make the Google Play services APIs available to your app:

Copy the library project at <android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/ to the location where you maintain your Android app projects.

Import the library project into your Eclipse workspace. Click File > Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.

After you've added the Google Play services library as a dependency for your app project, open your app's 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" />
Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Shvet Chakra
  • 1,043
  • 10
  • 21
  • I think this is what i was needed. Thank you. My computer is making some problems. I will accept the answer when he will booted again. – God Dec 08 '15 at 14:00
  • I imported the library and chaned the `` and now the errors are gone but thers still exclamation marks. – God Dec 08 '15 at 14:56
  • In the package explorer near the project name – God Dec 08 '15 at 16:37
  • I have got `Description Resource Path Location Type The container 'Android Dependencies' references non existing library 'C:\Users\volc\Desktop\Android Applications 2\appcompat_v7\bin\appcompat_v7.jar' Get Build path Build Path Problem` but problem. but thats another question. – God Dec 08 '15 at 16:52
  • this has nothing to do with googleplayservices but try this, go to project>properties>java build path>libraries>add jars>appcompat_v7>libs>, then I selected android-support-v7-appcompat.jar. After this, go to project>clean. This may fix the problem. or follow this link http://stackoverflow.com/questions/26595692/the-container-android-dependencies-references-non-existing-library-appcompat-v – Shvet Chakra Dec 08 '15 at 17:05
0

Basically google play services library is not needed to download, it resides in your SDK only

and here is the path, you can find the library

.../sdk/extras/google/google_play_services/libproject/google-play-services_lib
Nigam Patro
  • 2,760
  • 1
  • 18
  • 33
0

I think the following could solve your problem:

 <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="AIzaSyCzVDpAckc5p3DGRIJsco-CyIiFfjgn--k" />
                                                              ^
                                                              !    
Jörn Buitink
  • 2,906
  • 2
  • 22
  • 33