给定的工件包含一个字符串文字,其中包含无法安全重写的包引用 'android.support.v4.widget'
The given artifact contains a string literal with a package reference 'android.support.v4.widget' that cannot be safely rewritten
当我尝试将我的项目与 gradle 个文件同步时出现此错误
ERROR: Manifest merger failed : 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 element
at AndroidManifest.xml:23:5-342:19 to override.
我做了一些研究,在将 android.useAndroidX=true
和 android.enableJetifier=true
添加到我的 gradle.properties[= 后,我能够将项目与 gradle 文件同步30=] 文件。
但是当我尝试 运行 我的应用程序时,出现了这个错误
The given artifact contains a string literal with a package reference
'android.support.v4.widget' that cannot be safely rewritten. Libraries
using reflection such as annotation processors need to be updated
manually to add support for androidx.
我没有使用 butterknife 并且添加 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工作室IDE迁移到androidX
尝试从 android 工作室控制台迁移到 androidX 并将 parceler 升级到 版本 1.1.12
implementation 'org.parceler:parceler-api:1.1.12'
annotationProcessor 'org.parceler:parceler:1.1.12'
当我尝试将我的项目与 gradle 个文件同步时出现此错误
ERROR: Manifest merger failed : 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 element at AndroidManifest.xml:23:5-342:19 to override.
我做了一些研究,在将 android.useAndroidX=true
和 android.enableJetifier=true
添加到我的 gradle.properties[= 后,我能够将项目与 gradle 文件同步30=] 文件。
但是当我尝试 运行 我的应用程序时,出现了这个错误
The given artifact contains a string literal with a package reference 'android.support.v4.widget' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.
我没有使用 butterknife 并且添加 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工作室IDE迁移到androidX
尝试从 android 工作室控制台迁移到 androidX 并将 parceler 升级到 版本 1.1.12
implementation 'org.parceler:parceler-api:1.1.12'
annotationProcessor 'org.parceler:parceler:1.1.12'