gpt4 book ai didi

android - :app:dexDebug on adding libGoogleAnalyticsServices

转载 作者:行者123 更新时间:2023-11-30 02:04:46 24 4
gpt4 key购买 nike

在尝试运行我的项目时,出现以下错误:

Error:Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_67\bin\java.exe'' finished with non-zero exit value 2

我正在添加 google analytics jar file from here .如果我从 build.gradledependencies 中删除此行 compile files('libs/libGoogleAnalyticsServices.jar') ,问题就会消失/p>

1libGoogleAnalyticsServices.jar` 是否干扰了我的依赖项中的其他内容?

dependencies {
//compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.facebook.android:facebook-android-sdk:4.1.1'
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/newrelic.android.jar')
compile files('libs/libGoogleAnalyticsServices.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile 'com.google.android.gms:play-services:7.5.0'
compile('de.keyboardsurfer.android.widget:crouton:1.8.5@aar') {

}

compile ("com.doomonafireball.betterpickers:library:1.6.0")

compile ("com.doomonafireball.betterpickers:library:1.6.0") {
transitive = true
exclude group: 'com.android.support', module: 'support-v4'
}
compile project(':circularImageView')

}

最佳答案

此错误还可能表示您已达到 Android 中 65k 方法的限制。如果是这种情况,那么您有 3 个选择

有选择地使用所需的播放服务库部分。这个图书馆本身会让你接近极限。让 Progaurd 最小化您的应用程序。

使用 Multi-dex 拆分您的 dex 索引。

这些指南将帮助您实现上述选项;

http://googleadsdeveloper.blogspot.ie/2015/01/reducing-google-play-services-impact-on.html

https://developer.android.com/tools/building/multidex.html

关于android - :app:dexDebug on adding libGoogleAnalyticsServices,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30858687/

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