Fra*_*rew 8 android gradle android-manifest android-studio react-native
运行项目时发现错误,我尝试查找许多示例,但全部失败,这是错误的详细信息:
D:\myApp\android\app\src\debug\AndroidManifest.xml:22:18-91 Error:
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 <application> element at AndroidManifest.xml:7:5-117 to override.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
> Task :app:processDebugManifest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> 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 <application> element at AndroidManifest.xml:7:5-117 to override.
Run Code Online (Sandbox Code Playgroud)
请任何人帮助我解决此问题。
谢谢
react-native-reanimated因此,我在安装以使其正常工作时遇到了这个问题react-navigation-drawer。
修复方法是:
android.enableJetifier=true
android.useAndroidX=true
Run Code Online (Sandbox Code Playgroud)
yarn add jetifier
在android目录下运行:
./gradlew clean
跑步:
yarn jetify
react-native run-android
我的RN版本0.59.8
| 归档时间: |
|
| 查看次数: |
4584 次 |
| 最近记录: |