gpt4 book ai didi

android - gms/analytics android studio 2.2rc2 的重复依赖错误

转载 作者:行者123 更新时间:2023-12-02 12:46:51 28 4
gpt4 key购买 nike

我的应用程序级别 Gradle

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 23
buildToolsVersion "24.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.mss.triplestar"
minSdkVersion 15
targetSdkVersion 23
multiDexEnabled true
}
//====================Add below two line=============
dexOptions {
javaMaxHeapSize "4g" //specify the heap size for the dex process
preDexLibraries = false //delete the already predexed libraries
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}

dependencies {
compile 'com.android.support:support-v4:23.4.0'
compile files('libs/dagger-1.2.2.jar')
compile files('libs/javax.inject-1.jar')
compile files('libs/libGoogleAnalyticsServices.jar')
// compile files('libs/libGoogleAnalyticsV2.jar')
compile 'com.google.android.gms:play-services-analytics:9.0.0'
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/vungle-publisher-adaptive-id-3.3.1.jar')
compile 'com.google.android.gms:play-services-ads:9.0.0'
compile project(':wheelLib')
compile 'com.google.android.gms:play-services:9.0.0'
// compile 'com.google.android.gms:play-services-gcm:9.0.0'
compile 'org.apache.httpcomponents:httpclient:4.5'
compile 'com.scottyab:aescrypt:0.0.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:24.2.0'
}

我的日志输出

Information:Gradle tasks [:app:assembleDebug]
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.5 is ignored for debug as it may be conflicting with the internal version provided by Android.
Warning:WARNING: Dependency org.apache.httpcomponents:httpclient:4.5 is ignored for release as it may be conflicting with the internal version provided by Android.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/analytics/internal/Command$1.class
Information:BUILD FAILED
Information:Total time: 2.579 secs
Information:1 error
Information:2 warnings
Information:See complete output in console

This is my log output i am trying to build and update my project but it gives me this error if i removed analytic jar than i get easy tracker error .please help i am stuck at this point getting no clue .tried all the solutions .Thanks in advance

最佳答案

由于您要添加适用于 Android 的 Google Analytics SDK 的 legacy version,因此您应该将其删除。

删除:

compile files('libs/libGoogleAnalyticsServices.jar')

还将插件添加到应用程序级别的底部 build.gradle:

apply plugin: 'com.google.gms.google-services'

也没有理由同时使用两者:

   compile 'com.google.android.gms:play-services-ads:9.0.0'
compile 'com.google.android.gms:play-services:9.0.0'

并且您不应该使用compile 'com.google.android.gms:play-services:9.0.0',因为它包含每个 Google Play 服务库 - 仅使用 APIs you need

关于android - gms/analytics android studio 2.2rc2 的重复依赖错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39544151/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com