react-native-screens icon indicating copy to clipboard operation
react-native-screens copied to clipboard

[Android] Task :react-native-screens:compileReleaseKotlin FAILED

Open bulkinav opened this issue 5 months ago • 5 comments

Description

IS_NEW_ARCHITECTURE_ENABLED = TRUE bridgelessEnabled = FALSE

Android Studio 2023.2.1

buildToolsVersion = "34.0.0" minSdkVersion = 23 // Android 6.0 and above compileSdkVersion = 34 // Android 14 (gives access to new APIs) targetSdkVersion = 33 // Android 13 ndkVersion = "25.1.8937393" kotlinVersion = "1.8.22"


Hello,

When I'm trying to build the my project (release or begug - it does not matter) with IS_NEW_ARCHITECTURE_ENABLED = TRUE, the following error occurs:

> Task :react-native-screens:compileReleaseKotlin
e: file:/app-react/node_modules/react-native-screens/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt:13:16 Redeclaration: FabricEnabledViewGroup
e: file:/app-react/node_modules/react-native-screens/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt:7:16 Redeclaration: FabricEnabledViewGroup

Steps to reproduce

  1. Enable NEW ARCHITECTURE
  2. Build the own project

Snack or a link to a repository

N/A

Screens version

3.29.0

React Native version

0.73.6

Platforms

Android

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Release mode

Device

Android emulator

Device model

No response

Acknowledgements

Yes

bulkinav avatar Mar 14 '24 09:03 bulkinav

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

github-actions[bot] avatar Mar 14 '24 09:03 github-actions[bot]

@bulkinav How do you enable new architecture?

You should do it by setting newArchEnabled = true in your application gradle.properties as done here. Seems like that's missing.

kkafar avatar Mar 14 '24 09:03 kkafar

Of course, this is enabled using newArchEnabled = true

I also decided to clear the 'node-modules' and '.gradle' folders and now the build of the project stop with a different error (https://github.com/react-native-async-storage/async-storage/issues/1070). So it looks like need to solve it first and only then it will be clear whether the react-native-screens:compileReleaseKotlin FAILED problem will be reproduced or not.

bulkinav avatar Mar 14 '24 15:03 bulkinav

And how did it go?

kkafar avatar Apr 12 '24 14:04 kkafar

Hi @bulkinav! Just wanted to politely nudge you here, since we still don't have enough information about this bug 😕 Also, how are you trying to enable new architecture mode? Could you provide us minimal reproducer or at least send the output from npx react-native info? I'll also mark this issue (again) with Close when stale tag, in case of lack of any updates, but I don't have any wrong intentions there! 😄

tboba avatar May 06 '24 14:05 tboba