gpt4 book ai didi

java - 错误 :Execution failed for task

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:14:27 24 4
gpt4 key购买 nike

我在Android studio 中使用Telegram 的源代码时遇到了这个问题。所以我使用 android studio preview 3.0.0 beta 2,gradle 4.1-all.zip,mainsdk:15。我做了一切,但它无法正常工作。

错误是:

Error:Execution failed for task: TMessagesProj:transformDexArchiveWithExternalLibsDexMergerForDebug. java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

build.gradle 文件是:

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-beta4'
}
}
apply plugin: 'com.android.application'

repositories {
mavenCentral()
}

dependencies {
compile 'com.android.support:support-v4:21.0.+'
compile 'com.google.android.gms:play-services:3.2.+'
compile 'net.hockeyapp.android:HockeySDK:3.5.+'
compile 'com.googlecode.mp4parser:isoparser:1.0.+'
compile 'com.android.support:recyclerview-v7:+'
}

android {
compileSdkVersion 21
buildToolsVersion '26.0.0'

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}

signingConfigs {
debug {
storeFile file("config/debug.keystore")
}

release {
storeFile file("config/release.keystore")
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
}
}

buildTypes {
debug {
debuggable true
jniDebuggable true
signingConfig signingConfigs.debug
}

release {
debuggable false
jniDebuggable false
//signingConfig signingConfigs.release
}

foss {
debuggable false
jniDebuggable false
signingConfig signingConfigs.release
}
}

sourceSets.main {
jniLibs.srcDir 'libs'
jni.srcDirs = [] //disable automatic ndk-build call
}

sourceSets.debug {
manifest.srcFile 'config/debug/AndroidManifest.xml'
}

sourceSets.release {
manifest.srcFile 'config/release/AndroidManifest.xml'
}

sourceSets.foss {
manifest.srcFile 'config/foss/AndroidManifest.xml'
}

lintOptions {
checkReleaseBuilds false
abortOnError false
}

defaultConfig {
applicationId "org.telegram.plus"
minSdkVersion 15
targetSdkVersion 21
versionCode 458
versionName "2.5.2.1"

}
}

所以 gradle-wrapper.propertiesservices.gradle.org/distributions/gradle-4.1-all.zip

最佳答案

尝试删除该行:

compile 'com.google.android.gms:play-services:3.2.+'

如果可行。将其替换为您需要的播放服务的特定部分,例如:

compile 'com.google.android.gms:play-services-gcm:11.2.0'

用于 Google 云消息传递。

关于java - 错误 :Execution failed for task,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46118739/

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