Skip to content

Conflict with react-native-worklets-core #7883

@r0b0t3d

Description

@r0b0t3d

Description

My package.json

"react-native-worklets": "^0.4.0",
"react-native-worklets-core": "1.6.0",

I got this issue when building android

<project>/android/app/build/generated/autolinking/src/main/java/com/facebook/react/PackageList.java:122: error: a type with the same simple name is already defined by the single-type-import of WorkletsPackage
import com.worklets.WorkletsPackage;
^
<project>/android/app/build/generated/autolinking/src/main/java/com/facebook/react/PackageList.java:225: error: reference to WorkletsPackage is ambiguous new WorkletsPackage(), ^ both class com.swmansion.worklets.WorkletsPackage in com.swmansion.worklets and class com.worklets.WorkletsPackage in com.worklets match
<project>/android/app/build/generated/autolinking/src/main/java/com/facebook/react/PackageList.java:226: error: reference to WorkletsPackage is ambiguous new WorkletsPackage(), ^ both class com.swmansion.worklets.WorkletsPackage in com.swmansion.worklets and class com.worklets.WorkletsPackage in com.worklets match
3 errors FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':app:compileSandboxDebugJavaWithJavac'.
> Compilation failed; see the compiler output below. <project>/android/app/build/generated/autolinking/src/main/java/com/facebook/react/PackageList.java:122: error: a type with the same simple name is already defined by the single-type-import of WorkletsPackage import com.worklets.WorkletsPackage; 

Steps to reproduce

  1. yarn add react-native-worklets-core react-native-worklets
  2. Build Android project

Snack or a link to a repository

no link

Reanimated version

4.0.0

React Native version

0.80.1

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

No response

Device

No response

Host machine

None

Device model

No response

Acknowledgements

Yes

Metadata

Metadata

Assignees

Labels

Platform: AndroidThis issue is specific to AndroidRepro providedA reproduction with a snippet of code, snack or repo is provided

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions