0
Error:(6, 1) error: GoogleMap is already defined in this compilation unit while building project from android studio.

How to fix this problem

This is the dependencies i used

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.google.android.gms:play-services-maps:7.8.0'
}
Michele Lacorte
  • 5,323
  • 7
  • 32
  • 54
Rithesh
  • 1
  • 1
  • 1
    http://stackoverflow.com/questions/18745803/gradle-error-attribute-xxx-has-already-been-defined-in-android-studio – kgandroid Sep 11 '15 at 07:41

1 Answers1

0

You should remove this line in your dependencies:

compile 'com.android.support:appcompat-v7:23.0.1'

The last version of Google Play Services now uses appcompat-v7, so u can't use it with Google Maps. You have to use only appcompat-v7 or the previous version of Google services!

Read also Gradle error "Attribute "xxx" has already been defined" in Android Studio.

Community
  • 1
  • 1
Suriyaa
  • 2,222
  • 2
  • 25
  • 44