gpt4 book ai didi

java - 生成签名的APK错误com.android.dex.DexException : Multiple dex files define

转载 作者:行者123 更新时间:2023-12-03 05:48:19 25 4
gpt4 key购买 nike

这个问题在这里已经有了答案:





Android support multidex library implementation

(4 个回答)


4年前关闭。




生成签名的apk时,有这个错误,但构建项目是好的

错误:将字节码转换为 dex 时出错:
原因:com.android.dex.DexException:多个dex文件定义了Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat;

毕业典礼:

apply plugin: 'com.android.application'

repositories {
maven {
url 'https://raw.github.com/71241NW123CK/maven-repo/master'
}
}

android {
compileSdkVersion 23
buildToolsVersion '25.0.0'

defaultConfig {
applicationId "com.baclock"
minSdkVersion 16
targetSdkVersion 23
versionCode 18
versionName "2018.02.09"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
incremental false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'party.treesquaredcode.android:flip-animation:0.0.2'
compile 'com.mcxiaoke.volley:library:1.0.6'
compile 'com.google.android.gms:play-services-gcm:8.1.0'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.evernote:android-job:1.2.4'
}

apply plugin: 'com.google.gms.google-services'

最佳答案

添加 multiDexEnabled true在默认配置中,然后尝试。

defaultConfig {
applicationId "com.baclock"
minSdkVersion 16
targetSdkVersion 23
versionCode 18
versionName "2018.02.09"
multiDexEnabled true
}

关于java - 生成签名的APK错误com.android.dex.DexException : Multiple dex files define,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48922612/

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