multiDexEnabled true
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.google.gms:google-services:3.1.0'
//classpath 'com.android.tools.build:gradle:2.3.3'
//classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
应用程序构建:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
multiDexEnabled true
applicationId "com.example.aaronliang.flow_v1"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
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:appcompat-v7:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.volley:volley:1.0.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.google.firebase:firebase-firestore:11.6.0'
compile 'com.google.firebase:firebase-auth:11.6.0'
compile 'com.google.firebase:firebase-core:11.6.0'
compile 'com.google.android.gms:play-services:11.6.0'
compile 'com.github.woxthebox:draglistview:1.5.0'
//compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
compile 'com.jjoe64:graphview:4.2.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.1'
}
}
}
}
任何帮助都将不胜感激,因为这个项目即将到期!
compile 'com.android.support:multidex:1.0.1'
android:name="android.support.multidex.MultiDexApplication"
应用插件: 堆栈跟踪错误 失败:生成失败,出现异常。 请访问https://help.gradle.org获取更多帮助
当我构建调试应用程序时,我遇到了这个问题!请帮助。 错误:任务': app: transformDexArchiveWitExternalLibsDexMergerForDebug'执行失败。 Java语言lang.RuntimeException:java。lang.RuntimeException:com。Android建设者德兴。DexArchiveMergerException:无法合并d
应用程序分级:
问题内容: 这是我的应用程序级别gradle文件: 编译项目时出现的完整错误是: 错误:任务’:app:transformDexArchiveWithExternalLibsDexMergerForDebug’的执行失败。 java.lang.RuntimeException:com.android.builder.dexing.DexArchiveMergerException:无法合并dex
将我的项目更新为3级,并生成了此错误 java.lang.runtimeException:java.lang.runtimeException:com.android.builder.dexing.dexArchivEmergerException:无法合并dex 在Gradle2.3中不显示此错误 build.gradle应用程序应用插件:'com.android.application' B