gpt4 book ai didi

android studio list 文件问题

转载 作者:行者123 更新时间:2023-11-29 02:18:33 30 4
gpt4 key购买 nike

我在构建项目时遇到错误。好像是androidx和support libraries有冲突,但是项目里没有设置androix。

错误:

Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add 'tools:replace="android:appComponentFactory"' to <application> element at AndroidManifest.xml:27:5-154:19 to override.

参见 http://g.co/androidstudio/manifest-merger有关 list 合并的更多信息。

我的构建 gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 29
defaultConfig {
applicationId "xxxxxxxxxxxxxxxx"
minSdkVersion 15
targetSdkVersion 29
versionCode 16
versionName "2.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}

}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:support-v13:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.github.yukuku:ambilwarna:2.0.1'
implementation 'com.astuetz:pagerslidingtabstrip:1.0.1'
implementation 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
implementation 'com.wang.avi:library:2.1.3'
implementation 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.github.warkiz.tickseekbar:tickseekbar:0.1.3'
implementation 'com.jsibbold:zoomage:1.2.0'
implementation 'com.google.android.gms:play-services-ads:18.1.1'
implementation 'com.facebook.android:audience-network-sdk:5.4.1'

}

gradle.proprieties

# Project-wide Gradle settings.
# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decou

pled_projects

# org.gradle.parallel=true

最佳答案

您的一个或多个依赖项似乎正在将 androidx 加载到您的项目中,并且AndroidX 应该是所有支持库的替代品,你不应该一起使用它们,因为它们会相互覆盖类。看看 AndroidX Doc .

您需要从您的项目中找到并删除正在使用 androidx 的库,或者将其迁移到 androidx。我建议将项目完全迁移到 androidx

这很容易做到,而且支持库已经过时了。而且您会发现 androidx 更易于使用。

关于android studio list 文件问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58118119/

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