gpt4 book ai didi

安卓工作室 "Unable to merge dex"

转载 作者:行者123 更新时间:2023-12-03 06:32:13 24 4
gpt4 key购买 nike

我不断收到此错误。我清理了所有东西,构建,重建,jumbomode,MultidexApplication 我尽我所能尝试了一切,但一切都没有成功。

有时候需要一个一个的去掉依赖,但是现在没用了。

我被这个错误困住了一个多星期。有人知道如何解决吗?

下面是我的配置文件。

应用程序.gradle

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
maven {
url 'https://maven.fabric.io/public'
}
}

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId ""
minSdkVersion 21
targetSdkVersion 26
versionCode 6
versionName "1.0.5"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
/*manifestPlaceholders = [ onesignal_app_id: "",
onesignal_google_project_number: "REMOTE" ]*/

manifestPlaceholders = [
manifestApplicationId : "${applicationId}",
onesignal_app_id : "",
onesignal_google_project_number: ""
]
}
dexOptions {
// jumboMode true
javaMaxHeapSize "4g"
preDexLibraries = false
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
ext.enableCrashlytics = false
}
}
dataBinding {
enabled = true
}
}

dependencies {
//noinspection GradleCompatible
implementation 'com.android.support:design:26.1.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:support-v4:26.1.0'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
// implementation 'com.android.support:customtabs:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
// one signal
implementation 'com.onesignal:OneSignal:3.7.1@aar'
// zendesk
implementation 'com.zendesk:sdk:1.10.0.1'
implementation('com.zendesk:sdk:1.10.0.1@aar') {
transitive = true
}
// UnifyID
implementation 'id.unify.sdk:sdk:0.8.1'
implementation 'com.android.support:multidex:1.0.2'
// circle ImageView
implementation 'de.hdodenhof:circleimageview:2.1.0'
// fabric
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true
}
// fitChart
implementation 'com.txusballesteros:FitChart:1.0'
// retrofit2
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
// google play services(google fit, google map, location)
//noinspection GradleCompatible,UseOfBundledGooglePlayServices
// implementation 'com.google.android.gms:play-services:11.8.0'
//noinspection GradleCompatible
implementation 'com.google.android.gms:play-services-fitness:11.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
// implementation 'com.google.android.gms:play-services-location:11.8.0'
// implementation 'com.google.android.gms:play-services-places:11.8.0'
// firebase
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
// facebook
implementation 'com.facebook.android:facebook-android-sdk:4.25.0'
implementation 'com.twitter.sdk.android:twitter:3.1.1'
// glide
implementation 'com.github.bumptech.glide:glide:4.5.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.5.0'
}

项目.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.

//apply plugin: 'com.jfrog.artifactory'
//apply plugin: 'maven-publish'

buildscript {
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://maven.google.com" }
//maven { url "https://artifacts.unify.id" }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.1.0'
classpath 'io.fabric.tools:gradle:1.25.1'

classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
// classpath 'io.fabric.tools:gradle:1.22.1'
//classpath "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release"

// 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 "http://gradle.unify.id/artifactory/gradle-release"
credentials {
username = ""
password = ""
}
}
maven { url 'https://zendesk.jfrog.io/zendesk/repo' }
maven { url "https://maven.google.com" }

google()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

最佳答案

尝试 gms:play-services:X.X.X 的不同版本组合库,并尝试在您的 中添加此代码应用模块 build.gradle文件

android {
defaultConfig {
multiDexEnabled true
}
}

关于安卓工作室 "Unable to merge dex",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48192878/

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