我有Android Studio 3.0.1。添加新库后,当我尝试启动应用程序时,它没有启动消息:
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
com.android.builder.dexing.DexArchiveMergerException:无法合并dex
但我不知道如何解决这个错误。我用Google搜索了但没有成功。
我的应用程序gradle:
apply plugin: 'com.android.application' android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.xxxxxxx.app"
minSdkVersion 15
targetSdkVersion 26
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
versionCode 3
versionName "1.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}}dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:multidex:1.0.2'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:26.1.0'
compile 'com.android.volley:volley:1.0.0'
compile files('libs/KGJsonConverter.jar')
compile files('libs/gson-2.2.4.jar')
compile 'com.github.amigold.fundapter:library:1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile files('libs/PhotoUtil.jar')
compile files('libs/GenAsync.1.2.jar')
compile files('libs/MD5Simply.jar')
compile 'com.soundcloud.android:android-crop:1.0.1@aar'
compile 'com.quickblox:quickblox-android-sdk-core:3.3.0'
compile 'com.quickblox:quickblox-android-sdk-chat:3.3.0'}
我的项目gradle:
buildscript {
repositories {
jcenter()
google()
} dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'}}allprojects {
repositories {
jcenter()
google() maven{ url 'https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/'}}}task clean(type: Delete) { delete rootProject.buildDir}
答案 0 :(得分:0)
使用以下依赖项。
compile 'com.quickblox:quickblox-android-sdk-videochat-webrtc:3.3.3@aar'
compile 'com.quickblox:quickblox-android-sdk-content:3.3.3@aar'
compile('com.quickblox:quickblox-android-sdk-chat:3.3.3@aar') {
transitive = true
}