Setu Kumar Basak
Setu Kumar Basak

Reputation: 12032

How to solve 2 libraries with same package name in my dependencies in Android Studio?

I have below dependencies in my project:

     compile fileTree(dir: 'libs', include: ['*.jar'])
     compile 'com.android.support:appcompat-v7:21.0.2'
     compile 'com.google.android.gms:play-services:6.5.87'
     compile project(path: ':backend', configuration: 'android-endpoints')
     compile project(':library')
     compile files('libs/volley.jar')
     compile('com.google.maps.android:android-maps-utils:0.3+')

Now while syncing i got the below error:

Error:Execution failed for task ':app:processDebugResources'.

Error: more than one library with package name 'com.google.maps.android' You can temporarily disable this error with android.enforceUniquePackageName=false However, this is temporary and will be enforced in 1.0

I have tried like below but same error i got:

 compile('com.google.maps.android:android-maps-utils:0.3') {
    exclude group: 'com.google.android.gms'
}

I have also tried like below but error remains:

  compile('com.google.maps.android:android-maps-utils:0.3') { transitive = false }

I am using the below:

classpath 'com.android.tools.build:gradle:1.0.0'

What Should I do??

Upvotes: 2

Views: 3477

Answers (1)

bjiang
bjiang

Reputation: 6078

I tried following and it worked:

enter image description here

So the problem is not at

compile('com.google.maps.android:android-maps-utils:0.3+')

It duplicates in following lines:

compile project(path: ':backend', configuration: 'android-endpoints')
compile project(':library')

Please check if they included package named com.google.maps.android.

Upvotes: 2

Related Questions