在模块jetified-react-android-0.71-debug.3-debug-runtime和jetified-react-native-0.69-debug.2-debug-runtime中发现重复类com.facebook..

js5cn81o  于 2023-03-16  发布在  Android
关注(0)|答案(1)|浏览(148)

/用户/gagangupta/. gradle/缓存/转换-3/0f1732d94a06d041909e2f52d4f8dad0/transformed/jetified-react-native-0.69.2-debug/AndroidManifest.xml警告:软件包名称“com.facebook.react”用于:React:React-原生:0.69.2,React:React-安卓:0.71.3。
任务:应用程序:检查调试重复类失败ReactNativeFirebase警告:NPM包“@react-native-firebase/remote-config”依赖于“@react-native-firebase/app”v17.3.0,但找到了v15.7.1,这可能导致构建问题或运行时崩溃。
此版本中使用了已弃用的Gradle功能,因此与Gradle 8.0不兼容。
您可以使用'--warning-mode all'来显示各个弃用警告,并确定它们是否来自您自己的脚本或插件。
参见https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings335可操作任务:执行13项,更新322项
失败:生成失败,出现异常。

  • 出了什么问题:任务“:app:checkDebugDuplicateClasses”的执行失败。

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.facebook.debug.debugoverlay.model.DebugOverlayTag found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.debug.holder.NoopPrinter found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.debug.holder.Printer found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.debug.holder.PrinterHolder found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.debug.tags.ReactDebugOverlayTags found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeAccessibilityInfoSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeAccessibilityManagerSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeActionSheetManagerSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeAlertManagerSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeAnimatedModuleSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeAnimatedTurboModuleSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeAnimationsDebugModuleSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeAppStateSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeAppearanceSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeBlobModuleSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeBugReportingSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeClipboardSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeDatePickerAndroidSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeDevLoadingViewSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeDevMenuSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeDevSettingsSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeDevSplitBundleLoaderSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeDeviceEventManagerSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeDeviceInfoSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeDialogManagerAndroidSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeExceptionsManagerSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeFileReaderModuleSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeFrameRateLoggerSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeHeadlessJsTaskSupportSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2) Duplicate class com.facebook.fbreact.specs.NativeI18nManagerSpec found in modules jetified-react-android-0.71-debug.3-debug-runtime (com.facebook.react:react-android:0.71.3) and jetified-react-native-0.69-debug.2-debug-runtime (com.facebook.react:react-native:0.69.2)

已删除gradle缓存,尝试清理和删除节点模块

68bkxrlz

68bkxrlz1#

通过引用Duplicated classes found in modules classes.jar,我想出了一个解决方案:
在android/app/build.gradle中,将以下内容添加到Android {}节点中

android {
...
    configurations {
        all*.exclude group: "com.facebook.react", module: "react-native"
    }
}

原因是一些依赖项包仍然在其build. gradle中使用“react-native”而不是“react-android”。
实现“com.facebook.react:React Native:+”

相关问题