gpt4 book ai didi

android - 来自 [androidx.core : Attribute application@appComponentFactory value=(androidx. 0.0] 的错误 :core:1. core.app.CoreComponentFactory)

转载 作者:行者123 更新时间:2023-11-29 23:00:54 25 4
gpt4 key购买 nike

我正在研究 firebase-ml。

早些时候,我使用的是它的 16 版本,它在我的项目中运行良好。但是经过一些需求,我需要升级到21.0.0,然后我就面临着

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

这是我正在使用的依赖项

implementation 'com.google.firebase:firebase-ml-vision:21.0.0'

有人解决过这个问题吗?

额外的

import java.text.SimpleDateFormat

buildscript {
repositories {
google()
maven { url 'https://plugins.gradle.org/m2/'}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.12.1'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

repositories {
maven { url 'https://maven.google.com' }
}

buildscript {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
jcenter()
}

dependencies {
// These docs use an open ended version so that our plugin
// can be updated quickly in response to Android tooling updates
classpath 'com.android.tools.build:gradle:3.4.1'
// We recommend changing it to the latest version from our changelog:
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
classpath 'io.fabric.tools:gradle:1.+'
}
}

repositories {
google()
//maven { url 'https://maven.google.com' }
jcenter()
mavenCentral()
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'io.fabric'

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

repositories {
maven { url 'https://dl.bintray.com/intercom/intercom-maven' }
}


android {

lintOptions {
abortOnError false
}

dexOptions {
jumboMode = true
}
signingConfigs {
config {
keyAlias 'evalexpert_android_key'
keyPassword 'algo_driven_eval_expert'
storeFile file('/Users/nadkyxa/Code/EvalExpert/eval_expert.jks')
storePassword 'algo_driven_eval_expert'
}
}
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId 'xyz.AlgoDriven.EvalExpert'
minSdkVersion 18
targetSdkVersion 28
versionCode 86
versionName "8.0.4"

multiDexEnabled true //important

manifestPlaceholders = [onesignal_app_id: "aa111770-4417-4674-b657-c91e40a3ff25",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "REMOTE"]

externalNativeBuild {
ndkBuild {
targets "ocrnative"
abiFilters "armeabi-v7a"
}
}
}

useLibrary 'org.apache.http.legacy'

externalNativeBuild {
ndkBuild {
path "src/main/jni/Android.mk"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug {
externalNativeBuild {
ndkBuild {
arguments "NDK_DEBUG:=1"
}
}
}
}
productFlavors {
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/ECLIPSE_.SF'
exclude 'META-INF/ECLIPSE_.RSA'
}
configurations.all {
resolutionStrategy {
force 'androidx.media:media:1.0.0'
}
}
}

allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://s3.amazonaws.com/repo.commonsware.com" }
// maven { url 'https://dl.bintray.com/intercom/intercom-maven' }
maven { url 'https://maven.fabric.io/public' }

mavenCentral()

maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
dependencies {
def suppLibVersion = '28.0.0'

androidTestImplementation 'androidx.test:runner:1.3.0-alpha01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha01'


implementation('com.crashlytics.sdk.android:crashlytics:2.9.6@aar') {
transitive = true;
}
implementation('com.crashlytics.sdk.android:answers:1.3.7@aar') {
transitive = true;
}
implementation project(':UrlImageViewHelper')
implementation project(':TwoWayGridView')
implementation project(':SlidingMenu')
implementation project(':Branch-Invite-SDK')
implementation('com.google.android.gms:play-services-base:17.0.0') {
force = true;
}

implementation('com.google.android.gms:play-services-maps:17.0.0') {
force = true;
}
// Firebase
implementation 'com.google.firebase:firebase-core:17.0.0'

implementation 'com.google.firebase:firebase-perf:18.0.1'
implementation 'com.google.firebase:firebase-database:18.0.0'
implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.firebase:firebase-messaging:19.0.1'

implementation 'com.google.firebase:firebase-ml-vision:21.0.0'
// OneSignal & Push Notify
implementation('com.onesignal:OneSignal:3.10.8') {
exclude group: 'com.google.android.gms'
}
implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
// Intercom
implementation 'io.intercom.android:intercom-sdk-base:5.+'
implementation 'io.intercom.android:intercom-sdk-fcm:5.+'
implementation 'com.android.support:recyclerview-v7:' + suppLibVersion
implementation 'com.android.support:gridlayout-v7:' + suppLibVersion
implementation 'com.android.support:support-v4:' + suppLibVersion
implementation 'com.android.support:design:' + suppLibVersion
implementation 'uk.co.chrisjenx:calligraphy:2.1.0'
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
implementation 'com.koushikdutta.ion:ion:2.+'
implementation 'com.github.JakeWharton:ViewPagerIndicator:2.4.1'
implementation 'com.github.jaydeepw:poly-picker:v1.0.22'
implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
implementation 'commons-io:commons-io:2.5'
implementation 'com.jsibbold:zoomage:1.1.0'
implementation 'com.wootric:wootric-sdk-android:2.5.2'
testImplementation 'junit:junit:4.13-beta-3'
implementation 'io.branch.sdk.android:library:2.+'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'info.hoang8f:android-segmented:1.0.6'
implementation 'com.otaliastudios:cameraview:1.6.0'
implementation 'com.github.eventtus:photo-editor-android:v1.0'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.+'
// implementation 'com.applozic.communication.uiwidget:mobicomkitui:5.34'
implementation project(':mobicomkit')
implementation project(':mobicomkitui')
implementation project(':mobicommons')
implementation 'com.google.android.material:material:1.0.0'
}

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

最佳答案

这里的问题是你的项目没有完全迁移到Android X,[com.android.support:support-compat:28.0.0]和androidx.core:core:1.0.0版本有冲突.

将 com.android.support:support 库更新为

implementation "androidx.core:core:1.0.0"

有关更多信息,请参阅本指南:https://developer.android.com/jetpack/androidx/migrate

https://developer.android.com/jetpack/androidx

更新:尝试将项目迁移到 Android X。附上截图如何操作。在此之后使缓存无效并重新启动。 enter image description here

关于android - 来自 [androidx.core : Attribute application@appComponentFactory value=(androidx. 0.0] 的错误 :core:1. core.app.CoreComponentFactory),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56929491/

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