nisrulz / easydeviceinfo

:iphone: [Android Library] Get device information in a super easy way.
Apache License 2.0
1.77k stars 227 forks source link

build error #3

Closed amorenew closed 8 years ago

amorenew commented 8 years ago

hi i can't build check this error Error:Execution failed for task ':app:processDebugResources'.

Error: more than one library with package name 'com.google.android.gms' in my gradle

compile 'com.google.android.gms:play-services-maps:7.8.0'

nisrulz commented 8 years ago

EasyDeviceInfo library under the hood references the google play services ad dependency, to enable retrieval of Advertiser ID( only on request via a function, not on its own)

Since you have an older version of google play services hence the issue. If you upgrade to latest version 8.4.0 it should work.

If you donot want to upgrade then you will have to instruct gradle to resolve to the version you are referring i.e 7.8.0

basically

configurations.all {
  resolutionStrategy.force 'com.google.android.gms:play-services:7.8.0'
}

I wrote a blog post recently about how to resolve dependency conflicts, you can check here for more information.

amorenew commented 8 years ago

thanks for help