gpt4 book ai didi

android - Gradle 清理构建问题

转载 作者:行者123 更新时间:2023-11-30 04:54:51 24 4
gpt4 key购买 nike

Duplicate class com.google.android.gms.tagmanager.zzcv found in modules classes.jar (com.google.android.gms:play-services-tagmanager-api:11.8.0) and classes.jar (com.google.android.gms:play-services-tagmanager-v4-impl:16.0.8)

我最近在 Gradle 构建中遇到了这个错误

Android list

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

dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 28
defaultConfig {
applicationId "tz.co.application.testExample"
vectorDrawables.useSupportLibrary = true
minSdkVersion 21
targetSdkVersion 28
versionCode 45
versionName "1.0.45"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
renderscriptTargetApi 19
renderscriptSupportModeEnabled true
multiDexEnabled = true

packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}


buildTypes {
release {
minifyEnabled true
debuggable false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}


allprojects {
repositories {
mavenCentral()
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
maven { url 'https://maven.google.com' }
}
}

dexOptions {
javaMaxHeapSize "4g"
}


dataBinding {
enabled = true
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
buildToolsVersion = '28.0.3'

android {
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}

configurations {
all*.exclude module: 'play-services-awareness'
}
}

defaultConfig {
vectorDrawables.useSupportLibrary = true
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:percent:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:palette-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'

implementation 'it.neokree:MaterialTabs:0.11'
implementation 'com.android.support:multidex:1.0.0'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'jp.wasabeef:blurry:2.0.3'
implementation 'jp.wasabeef:glide-transformations:2.0.1'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.jakewharton:disklrucache:2.0.2'
implementation 'me.zhanghai.android.materialprogressbar:library:1.1.7'
implementation 'com.facebook.fresco:fresco:1.1.0'
implementation 'net.steamcrafted:materialiconlib:1.0.3'
implementation 'com.android.support:support-core-utils:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.readystatesoftware.systembartint:systembartint:1.0.3'
implementation 'agency.tango.android:material-intro-screen:0.0.5'
implementation 'com.mani:ThinDownloadManager:1.4.0'
implementation 'com.github.moondroid.coverflow:library:1.0'
implementation 'com.google.code.gson:gson:2.7'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.firebaseui:firebase-ui:1.0.1'
implementation 'com.google.android.gms:play-services:11.8.0'
implementation 'com.squareup.okhttp3:okhttp:3.4.1'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.moos:Material-ProgressView:1.0.6'
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.hbb20:ccp:2.2.9'
implementation 'com.github.hannesa2:AndroidSlidingUpPanel:3.5.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
implementation 'com.crashlytics.sdk.android:answers:1.4.7'
implementation files('libs/httpclient-4.2.3.jar')
implementation 'com.hover:android-sdk:1.4.3'
implementation files('libs/skyepub.jar')
}

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

gradle(项目)

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

buildscript {

repositories {
google()
jcenter()
maven { url "http://dl.bintray.com/mobisystech/maven" }
}
dependencies {

classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.google.gms:google-services:4.1.0'

}
}

allprojects {
repositories {
google()
jcenter()
maven { url "http://dl.bintray.com/mobisystech/maven" }
maven { url "http://maven.usehover.com/releases" }
}
}

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

有什么问题吗??

最佳答案

我想你需要一个在终端上运行的命令gradlew 干净运行之后点击无效

关于android - Gradle 清理构建问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59434550/

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