gpt4 book ai didi

android - 我所有的 android 依赖项在哪里?

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

构建代码时遇到以下错误...

Android dependency 'com.android.support:support-v4' has different version for the compile (21.0.3) and runtime (27.1.1) classpath. You should manually set the same version via DependencyResolution



我知道这是一个 build.gradle 问题。但是我似乎看不到冲突。我有两个模块我的主要模块和一个库。

这在我对主模块的依赖项之下。
    dependencies {
implementation 'com.android.support:multidex:1.0.3'
api 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:gridlayout-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'uk.co.chrisjenx:calligraphy:2.2.0'
implementation 'com.github.bumptech.glide:glide:4.0.0-RC0'
implementation project(':Library')

testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'recyclerview-v7'
exclude group: 'com.android.support', module: 'gridlayout-v7'
}
}

这是库的依赖项。
dependencies {
implementation 'com.android.support:design:27.1.1'
api 'com.annimon:stream:1.1.9'
implementation 'commons-net:commons-net:3.6'
api 'org.apache.commons:commons-collections4:4.1'
implementation 'commons-io:commons-io:2.5'
api 'com.android.support:appcompat-v7:27.1.1'
api 'me.grantland:autofittextview:0.2.1'
implementation 'com.marcouberti.autofitbutton:android-auto-fit-button:0.1.1@aar'
api 'com.github.barteksc:android-pdf-viewer:2.4.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.1'

testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
}

所以我的问题是依赖项还可以隐藏在哪里?

编辑 添加构建文件的其余部分。
android {
signingConfigs {
release {
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
}
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "my.id"
minSdkVersion 19
targetSdkVersion 27
versionCode = 3000002
versionName "v3.00.02"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true

buildConfigField "boolean", "USE_HEARTBEAT", "true"
buildConfigField "boolean", "LAUNCH_APP_AFTER_APK_UPDATE", "false"
buildConfigField "Boolean", "HIDE_COMMON_LOGS", "true"
buildConfigField "String", "FTP_MEDIA_FOLDER_PATH", "\"s2/media/\""
buildConfigField "Boolean", "WIFI_ENABLED", "true"
}
buildTypes {
// Rename the output files for all variants
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "S2-" + variant.properties.flavorName.replace("S2_", "").replace("orion", "") + "-UPDATE-" + variant.versionName + ".apk"
}
}

release {
manifestPlaceholders = [appName: "@string/app_name"]
shrinkResources true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
manifestPlaceholders = [appName: "@string/app_name_debug"]
applicationIdSuffix '.debug'
versionNameSuffix '.debug'
ext.enableCrashlytics = false
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'com.android.support:multidex:1.0.3'
api 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:gridlayout-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'uk.co.chrisjenx:calligraphy:2.2.0'
implementation 'com.github.bumptech.glide:glide:4.0.0-RC0'
implementation project(':Library')

testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
androidTestImplementation 'com.android.support.test.espresso:espresso-contrib:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.android.support', module: 'support-v4'
exclude group: 'com.android.support', module: 'design'
exclude group: 'com.android.support', module: 'recyclerview-v7'
exclude group: 'com.android.support', module: 'gridlayout-v7'
}
}

最佳答案

最终成为一个问题

compileSdkVersion 26





compileSdkVersion 27



现在只是回到26。

关于android - 我所有的 android 依赖项在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50103392/

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