Skip to content

Android: Native Module Spec generated twice leads to Dex merging duplication #35

@scyrych

Description

@scyrych

Our project utilizes React Native Codegen for generating the necessary source code for our Native Modules, which is correctly placed in the host application's build path, typically under android/app/build/generated/source/codegen.

After adding @code-push-next/react-native-code-push, the Android build unexpectedly triggers Codegen a second time inside the library itself. This produces an extra copy of the same generated classes inside node_modules/@code-push-next/react-native-code-push/android/app/build/generated/source/codegen.

Because both the app and the library end up generating identical classes (for example, NativeCoreSpec under the same package namespace), the Dex merging step fails with duplicate-class errors.

We tried to disable codegen for @code-push-next/react-native-code-push with patch-package but it's not that easy.

We are using React Native 0.80.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions