问题描述:
Android errors:
AGPBI: {"kind":"error","text":"No resource identifier found for attribute \u0027appComponentFactory\u0027 in package \u0027android\u0027","sources":[{"file":"/Users/lilei/Development/Demo/AndroidStudy/app/build/intermediates/manifests/full/debug/AndroidManifest.xml","position":{"startLine":13}}],"original":"","tool":"AAPT"}
:app:processDebugResources FAILED
FAILURE: Build failed with an exception.
No resource identifier found for attribute 'appComponentFactory' in package 'android'
通过使用
./gradlew -q app:dependencies
(Linux 环境, 如果是Windows 就不需要 ./) 查看项目的依赖树, 一点点排除问题
+--- project :react-native-view-shot
| \--- com.facebook.react:react-native:+ -> 0.56.1
| +--- javax.inject:javax.inject:1
| +--- com.android.support:appcompat-v7:26.1.0
| | +--- com.android.support:support-annotations:26.1.0
| | +--- com.android.support:support-v4:26.1.0
| | | +--- com.android.support:support-compat:26.1.0
| | | | +--- com.android.support:support-annotations:26.1.0
| | | | \--- android.arch.lifecycle:runtime:1.0.0
| | | | +--- android.arch.lifecycle:common:1.0.0
| | | | \--- android.arch.core:common:1.0.0
| | | +--- com.android.support:support-media-compat:26.1.0
| | | | +--- com.android.support:support-annotations:26.1.0
| | | | \--- com.android.support:support-compat:26.1.0 (*)
| | | +--- com.android.support:support-core-utils:26.1.0
| | | | +--- com.android.support:support-annotations:26.1.0
| | | | \--- com.android.support:support-compat:26.1.0 (*)
| | | +--- com.android.support:support-core-ui:26.1.0
| | | | +--- com.android.support:support-annotations:26.1.0
| | | | \--- com.android.support:support-compat:26.1.0 (*)
| | | \--- com.android.support:support-fragment:26.1.0
| | | +--- com.android.support:support-compat:26.1.0 (*)
| | | +--- com.android.support:support-core-ui:26.1.0 (*)
| | | \--- com.android.support:support-core-utils:26.1.0 (*)
| | +--- com.android.support:support-vector-drawable:26.1.0
| | | +--- com.android.support:support-annotations:26.1.0
| | | \--- com.android.support:support-compat:26.1.0 (*)
| | \--- com.android.support:animated-vector-drawable:26.1.0
| | +--- com.android.support:support-vector-drawable:26.1.0 (*)
| | \--- com.android.support:support-core-ui:26.1.0 (*)
| +--- com.facebook.fbui.textlayoutbuilder:textlayoutbuilder:1.0.0
| | \--- com.facebook.fbui.textlayoutbuilder:staticlayout-proxy:1.0
| +--- com.facebook.fresco:fresco:1.9.0
| | +--- com.facebook.fresco:fbcore:1.9.0
| | +--- com.facebook.fresco:drawee:1.9.0
| | | +--- com.facebook.fresco:fbcore:1.9.0
| | | \--- com.facebook.fresco:imagepipeline:1.9.0
| | | +--- com.facebook.fresco:imagepipeline-base:1.9.0
| | | | +--- com.facebook.soloader:soloader:0.3.0
| | | | +--- com.parse.bolts:bolts-tasks:1.4.0
| | | | \--- com.facebook.fresco:fbcore:1.9.0
| | | +--- com.facebook.soloader:soloader:0.3.0
| | | +--- com.parse.bolts:bolts-tasks:1.4.0
| | | \--- com.facebook.fresco:fbcore:1.9.0
| | +--- com.facebook.fresco:imagepipeline:1.9.0 (*)
| | \--- com.facebook.soloader:soloader:0.3.0
| +--- com.facebook.fresco:imagepipeline-okhttp3:1.9.0
| | +--- com.squareup.okhttp3:okhttp:3.10.0
| | | \--- com.squareup.okio:okio:1.14.0
| | +--- com.facebook.fresco:fbcore:1.9.0
| | \--- com.facebook.fresco:imagepipeline:1.9.0 (*)
| +--- com.facebook.soloader:soloader:0.3.0
| +--- com.google.code.findbugs:jsr305:3.0.0
| +--- com.squareup.okhttp3:okhttp:3.10.0 (*)
| +--- com.squareup.okhttp3:okhttp-urlconnection:3.10.0
| | \--- com.squareup.okhttp3:okhttp:3.10.0 (*)
| +--- com.squareup.okio:okio:1.14.0
| \--- org.webkit:android-jsc:r174650
+--- project :react-native-fs
| \--- com.facebook.react:react-native:+ -> 0.56.1 (*)
+--- project :react-native-view-overflow
+--- project :react-native-wechat
| \--- com.facebook.react:react-native:+ -> 0.56.1 (*)
+--- project :react-native-version-number-nevo
| \--- com.facebook.react:react-native:+ -> 0.56.1 (*)
+--- project :react-native-fetch-blob
| \--- com.facebook.react:react-native:+ -> 0.56.1 (*)
+--- project :react-native-device-info
| +--- com.facebook.react:react-native:+ -> 0.56.1 (*)
| \--- com.google.android.gms:play-services-gcm:+ -> 17.0.0
| +--- androidx.collection:collection:1.0.0
| | \--- androidx.annotation:annotation:1.0.0
| +--- androidx.core:core:1.0.0
| | +--- androidx.annotation:annotation:1.0.0
| | +--- androidx.collection:collection:1.0.0 (*)
| | +--- androidx.lifecycle:lifecycle-runtime:2.0.0
| | | +--- androidx.lifecycle:lifecycle-common:2.0.0
| | | | \--- androidx.annotation:annotation:1.0.0
| | | +--- androidx.arch.core:core-common:2.0.0
| | | | \--- androidx.annotation:annotation:1.0.0
| | | \--- androidx.annotation:annotation:1.0.0
| | \--- androidx.versionedparcelable:versionedparcelable:1.0.0
| | +--- androidx.annotation:annotation:1.0.0
| | \--- androidx.collection:collection:1.0.0 (*)
| +--- androidx.legacy:legacy-support-core-utils:1.0.0
| | +--- androidx.annotation:annotation:1.0.0
| | +--- androidx.core:core:1.0.0 (*)
| | +--- androidx.documentfile:documentfile:1.0.0
| | | \--- androidx.annotation:annotation:1.0.0
| | +--- androidx.loader:loader:1.0.0
| | | +--- androidx.annotation:annotation:1.0.0
| | | +--- androidx.core:core:1.0.0 (*)
| | | +--- androidx.lifecycle:lifecycle-livedata:2.0.0
| | | | +--- androidx.arch.core:core-runtime:2.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | \--- androidx.arch.core:core-common:2.0.0 (*)
| | | | +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0
| | | | | +--- androidx.lifecycle:lifecycle-common:2.0.0 (*)
| | | | | +--- androidx.arch.core:core-common:2.0.0 (*)
| | | | | \--- androidx.arch.core:core-runtime:2.0.0 (*)
| | | | \--- androidx.arch.core:core-common:2.0.0 (*)
| | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0
| | | \--- androidx.annotation:annotation:1.0.0
| | +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
| | | \--- androidx.annotation:annotation:1.0.0
| | \--- androidx.print:print:1.0.0
| | \--- androidx.annotation:annotation:1.0.0
| +--- com.google.android.gms:play-services-base:17.0.0
| | +--- androidx.collection:collection:1.0.0 (*)
| | +--- androidx.core:core:1.0.0 (*)
| | +--- androidx.fragment:fragment:1.0.0
| | | +--- androidx.core:core:1.0.0 (*)
| | | +--- androidx.legacy:legacy-support-core-ui:1.0.0
| | | | +--- androidx.annotation:annotation:1.0.0
| | | | +--- androidx.core:core:1.0.0 (*)
| | | | +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
| | | | +--- androidx.customview:customview:1.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | \--- androidx.core:core:1.0.0 (*)
| | | | +--- androidx.viewpager:viewpager:1.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | +--- androidx.core:core:1.0.0 (*)
| | | | | \--- androidx.customview:customview:1.0.0 (*)
| | | | +--- androidx.coordinatorlayout:coordinatorlayout:1.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | +--- androidx.core:core:1.0.0 (*)
| | | | | \--- androidx.customview:customview:1.0.0 (*)
| | | | +--- androidx.drawerlayout:drawerlayout:1.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | +--- androidx.core:core:1.0.0 (*)
| | | | | \--- androidx.customview:customview:1.0.0 (*)
| | | | +--- androidx.slidingpanelayout:slidingpanelayout:1.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | +--- androidx.core:core:1.0.0 (*)
| | | | | \--- androidx.customview:customview:1.0.0 (*)
| | | | +--- androidx.interpolator:interpolator:1.0.0
| | | | | \--- androidx.annotation:annotation:1.0.0
| | | | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | +--- androidx.core:core:1.0.0 (*)
| | | | | \--- androidx.interpolator:interpolator:1.0.0 (*)
| | | | +--- androidx.asynclayoutinflater:asynclayoutinflater:1.0.0
| | | | | +--- androidx.annotation:annotation:1.0.0
| | | | | \--- androidx.core:core:1.0.0 (*)
| | | | \--- androidx.cursoradapter:cursoradapter:1.0.0
| | | | \--- androidx.annotation:annotation:1.0.0
| | | +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
| | | +--- androidx.annotation:annotation:1.0.0
| | | +--- androidx.loader:loader:1.0.0 (*)
| | | \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 (*)
| | +--- com.google.android.gms:play-services-basement:17.0.0
| | | +--- androidx.collection:collection:1.0.0 (*)
| | | +--- androidx.core:core:1.0.0 (*)
| | | \--- androidx.fragment:fragment:1.0.0 (*)
| | \--- com.google.android.gms:play-services-tasks:17.0.0
| | \--- com.google.android.gms:play-services-basement:17.0.0 (*)
| +--- com.google.android.gms:play-services-basement:17.0.0 (*)
| +--- com.google.android.gms:play-services-iid:[17.0.0] -> 17.0.0
| | +--- androidx.collection:collection:1.0.0 (*)
| | +--- androidx.core:core:1.0.0 (*)
| | +--- com.google.android.gms:play-services-base:17.0.0 (*)
| | +--- com.google.android.gms:play-services-basement:17.0.0 (*)
| | +--- com.google.android.gms:play-services-stats:17.0.0
| | | +--- androidx.legacy:legacy-support-core-utils:1.0.0 (*)
| | | \--- com.google.android.gms:play-services-basement:17.0.0 (*)
| | \--- com.google.android.gms:play-services-tasks:17.0.0 (*)
| \--- com.google.android.gms:play-services-stats:17.0.0 (*)
+--- project :react-native-splash-screen
| +--- com.android.support:appcompat-v7:26.1.0 (*)
| \--- com.facebook.react:react-native:+ -> 0.56.1 (*)
+--- project :react-native-picker
| \--- com.facebook.react:react-native:+ -> 0.56.1 (*)
+--- project :@remobile_react-native-toast
| +--- com.android.support:appcompat-v7:23.0.1 -> 26.1.0 (*)
| \--- com.facebook.react:react-native:+ -> 0.56.1 (*)
+--- com.android.support:appcompat-v7:26.1.0 (*)
\--- com.facebook.react:react-native:+ -> 0.56.1 (*)
在依赖关系中找到Androidx存在那个插件中
解决方法:
在gradle中添加
googlePlayServicesVersion = "12.0.1"指定版本
问题完美解决