我按照http://developer.android.com/google/play-services/setup.html#split上的教程,但我收到了错误
Error:Execution failed for task ':app:processDebugResources'.
错误:多个包含包名称的库' com.google.android.gms' 您可以使用android.enforceUniquePackageName = false暂时禁用此错误 但是,这是暂时的,将在1.0
中强制执行
我试过环顾四周,但大多数是因为他们有另一个已经有google-play-services的图书馆,但我相信这不是我的情况。这是我的傻瓜:
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "com.android.test"
minSdkVersion 14
targetSdkVersion 22
versionCode 21
versionName "1.1"
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
res.srcDirs =
[
'src/main/res/layout/activity',
'src/main/res/layout/adapter',
'src/main/res/layout/fragment',
'src/main/res/layout/custom',
'src/main/res',
'src/main/rescamera',
'src/main/res_swipecards'
]
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'src/libs')
compile files('src/libs/android-viewbadger.jar')
compile 'io.realm:realm-android:0.79.0'
compile 'com.squareup.retrofit:retrofit:1.8.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile project(':PullToRefreshLibrary')
compile project(':facebookSDK')
compile project(':simpleFacebook')
compile project(':AndroidTouchGallery')
compile project(':camera')
compile 'com.google.android.gms:play-services-gcm:7.3.0'
compile 'com.google.android.gms:play-services-ads:7.3.0'
compile 'com.google.android.gms:play-services-location:7.3.0'
compile 'net.hockeyapp.android:HockeySDK:3.0.2'
compile 'joda-time:joda-time:2.6'
compile('de.keyboardsurfer.android.widget:crouton:1.8.5@aar') {
exclude group: 'com.google.android', module: 'support-v4'
}
compile('com.playhaven.android:playhaven-api:2.2.6@aar') {
transitive = true
}
compile 'com.android.support:support-v4:22.0.0'
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.android.support:multidex:1.0.0'
}