当我尝试将我的项目与gradle文件同步时遇到了此错误
错误:清单合并失败:属性 application @ appComponentFactory 值=(android.support.v4.app.CoreComponentFactory)来自 [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91也位于 [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 值=(androidx.core.app.CoreComponentFactory)。意见建议:添加 'tools:replace =“ android:appComponentFactory”'转换为元素 在AndroidManifest.xml:23:5-342:19进行覆盖。
我进行了一些研究,将android.useAndroidX=true
和android.enableJetifier=true
添加到我的 gradle.properties 文件中之后,便能够使用gradle文件同步项目。
但是当我尝试运行我的应用程序时,出现此错误
给定的工件包含带有包引用的字符串文字 无法安全重写的“ android.support.v4.widget”。图书馆 使用反射,例如注释处理器需要更新 手动添加对androidx的支持。
我没有使用黄油刀,添加最新版本的Butterkinife并没有帮助。
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation "com.android.support:support-compat:28.0.0"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
implementation 'com.google.android.libraries.places:places:1.1.0'
implementation 'com.isseiaoki:simplecropview:1.1.7'
implementation 'com.github.imperiumlabs:GeoFirestore-Android:v1.1.1'
implementation 'com.android.support:design:28.0.0'
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.google.firebase:firebase-firestore:20.0.0'
implementation 'com.google.firebase:firebase-storage:18.0.0'
implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.firebase:firebase-messaging:19.0.0'
implementation 'com.google.firebase:firebase-functions:18.0.0'
implementation 'com.google.firebase:firebase-config:18.0.0'
implementation 'com.firebaseui:firebase-ui-storage:0.6.0'
implementation 'com.firebaseui:firebase-ui-auth:4.3.1'
implementation 'com.google.firebase:firebase-dynamic-links:18.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.google.android.gms:play-services-auth:17.0.0'
implementation 'com.github.danylovolokh:hashtag-helper:1.1.0'
implementation 'co.paystack.android:paystack:3.0.10'
implementation 'com.facebook.android:facebook-android-sdk:4.39.0'
implementation 'com.facebook.android:facebook-applinks:4.42.0'
implementation 'com.facebook.android:facebook-share:4.42.0'
implementation 'com.cuneytayyildiz:onboarder:1.0.3'
implementation 'com.android.volley:volley:1.1.1'
implementation 'com.github.Flutterwave:rave-android:1.0.34'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'
implementation 'org.parceler:parceler-api:1.1.9'
annotationProcessor 'org.parceler:parceler:1.1.9'
implementation 'com.squareup.retrofit2:converter-scalars:2.1.0'
implementation 'com.scottyab:aescrypt:0.0.1'
implementation "android.arch.lifecycle:extensions:1.1.1"
implementation "android.arch.lifecycle:viewmodel:1.1.1"
implementation 'com.github.clans:fab:1.6.4'
}
我也尝试过从 Android Studio IDE 迁移到androidX
答案 0 :(得分:1)
尝试从android studio控制台迁移到 androidX 并将 parceler 升级到 1.1.12
版本implementation 'org.parceler:parceler-api:1.1.12'
annotationProcessor 'org.parceler:parceler:1.1.12'