gpt4 book ai didi

android - 谷歌播放服务 : Finished With Non Zero Exit Value 2

转载 作者:太空宇宙 更新时间:2023-11-03 11:48:50 26 4
gpt4 key购买 nike

由于我的 gradle 内部出现问题,我无法让我的程序运行。我最近添加了依赖项:

compile 'com.google.android.gms:play-services:7.3.0'

我的项目。我在我的项目中将它用于 map 。但是当我运行这个项目时,我得到了这个错误:

Information:Gradle tasks [:app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72211Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42211Library UP-TO-DATE
:app:prepareComGithubShellSoftwareFab105Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppstate730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet730Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable730Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJava UP-TO-DATE
:app:preDexDebug UP-TO-DATE
:app:dexDebug
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)
at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)
at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
at com.android.dx.command.dexer.Main.run(Main.java:246)
at com.android.dx.command.dexer.Main.main(Main.java:215)
at com.android.dx.command.Main.main(Main.java:106)
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
Information:BUILD FAILED
Information:Total time: 48.802 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

我相信这是由于上面的编译行,但我的部分项目需要它。我不太确定在这里做什么。

编辑:这是我的整个 build.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
applicationId "com.aszend.android"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:22.1.1'
compile 'com.android.support:appcompat-v7:22.1.1'
compile files('libs/aws-android-sdk-autoscaling-2.2.1.jar')
compile files('libs/aws-android-sdk-cloudwatch-2.2.1.jar')
compile files('libs/aws-android-sdk-cognito-2.2.1.jar')
compile files('libs/aws-android-sdk-core-2.2.1.jar')
compile files('libs/aws-android-sdk-ddb-2.2.1.jar')
compile files('libs/aws-android-sdk-ddb-mapper-2.2.1.jar')
compile files('libs/aws-android-sdk-ec2-2.2.1.jar')
compile files('libs/aws-android-sdk-elb-2.2.1.jar')
compile files('libs/aws-android-sdk-kinesis-2.2.1.jar')
compile files('libs/aws-android-sdk-lambda-2.2.1.jar')
compile files('libs/aws-android-sdk-machinelearning-2.2.1.jar')
compile files('libs/aws-android-sdk-mobilenalytics-2.2.1.jar')
compile files('libs/aws-android-sdk-s3-2.2.1.jar')
compile files('libs/aws-android-sdk-sdb-2.2.1.jar')
compile files('libs/aws-android-sdk-ses-2.2.1.jar')
compile files('libs/aws-android-sdk-sns-2.2.1.jar')
compile files('libs/aws-android-sdk-sqs-2.2.1.jar')
compile files('libs/Parse-1.9.1.jar')
compile 'com.github.shell-software:fab:1.0.5'
compile 'com.parse.bolts:bolts-android:1.2.0'
compile 'com.google.android.gms:play-services:7.3.0'
}

感谢所有帮助

最佳答案

看起来你的项目已经超过了 65536 个方法,从错误中的这一行来看:

com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536

参见 this answer .基本上,你有很多导入的库,你的应用程序中的方法和所有导入的库的总和已经超过了限制。

这是您可以尝试的一件事,挑选并选择您需要的 Google Play 服务的各个部分,而不是导入整个库。参见 documentation here .

因此,如果您只需要 Google Play map 服务,请替换为:

compile 'com.google.android.gms:play-services:7.3.0'

有了这个:

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

希望这会让您低于限制!

关于android - 谷歌播放服务 : Finished With Non Zero Exit Value 2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30385873/

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