12

AANot sure why this error is occuring... This is my AndroidManifest.xml file. I added in Google Play Services, Repository and Android Support Library. Not sure if i need another plug in or what

          <?xml version="1.0" encoding="utf-8"?>
            <manifest xmlns:android="http://schemas.android.com/apk/res/android"
                      package="com.example.RuMaps"
                      android:versionCode="1"
                      android:versionName="1.0">
                <uses-sdk android:minSdkVersion="20"/>
                <application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
                    <activity android:name="MyActivity"
                              android:label="@string/app_name">
                        <intent-filter>
                            <action android:name="android.intent.action.MAIN"/>
                            <category android:name="android.intent.category.LAUNCHER"/>
                        </intent-filter>
                    </activity>

                    <meta-data
                            android:name="com.google.android.gms.version"
                            android:value="@integer/google_play_services_version" />

                    <meta-data
                            android:name="com.google.android.maps.v2.API_KEY"
                            android:value="API-KEY"/>

                </application>
            </manifest>
Patricia Rozario
  • 151
  • 1
  • 2
  • 10

2 Answers2

14

Try adding this in the build.gradle file:

dependencies {
    compile 'com.google.android.gms:play-services:7.5.0'
}
Jorge Cob
  • 166
  • 2
  • 15
  • I had version 6.+ as in "...play-services:6.+" and was getting this error. changing to 7.5.0 worked. : ) – flobacca Oct 27 '15 at 00:09
  • 1
    SOLVED, thanks, followed instructions of this post - http://stackoverflow.com/a/19844573/3183423 – Nika Kasradze Nov 06 '15 at 15:27
  • Note that the above adds the entire google play services library to your application. If you want to use maps for instance you may just need `implementation 'com.google.android.gms:play-services-maps:17.0.0'` `implementation 'com.google.android.gms:play-services-location:17.0.0'` See this for more: https://developers.google.com/android/guides/setup – Braden Holt Aug 28 '19 at 16:32
0

If you get the error: Cannot resolve symbol @integer ... you might need to define the values for the missing integers in your integers.xml file.

If you don't have one already, you will need to create it at:

res/values/integers.xml

Example:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <integer name="my_int_val1">1000</integer>
    <integer name="my_int_val2">500</integer>
</resources>
live-love
  • 48,840
  • 22
  • 240
  • 204