
1. 项目异常
Error:
Attribute application@appComponentFactory
value=(androidx.core.app.CoreComponentFactory) from
[androidx.core:core:1.3.1] AndroidManifest.xml:24: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:9:5-33:19 to override.See http://g.co/androidstudio/manifest-merger for more information
about the manifest merger.Execution failed for task ‘:app:processDebugMainManifest’.
Manifest merger failed with multiple errors, see logs
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
2. 解决方法
gradle.properties文件中添加
android.enableJetifier=true
然后重新编译运行即可