software-mansion / react-native-screens

Native navigation primitives for your React Native app.
MIT License
3k stars 509 forks source link

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

Closed bulkinav closed 2 months ago

bulkinav commented 5 months ago

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

github-actions[bot] commented 5 months ago

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?

kkafar commented 5 months ago

@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.

bulkinav commented 5 months ago

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.

kkafar commented 4 months ago

And how did it go?

tboba commented 3 months ago

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! 😄

kkafar commented 2 months ago

It seems that there is no activity here, we have no reproduction and not enough detail to proceed with solving this issue -> I'm closing. If you, future traveler, have encountered similar problem and looking for solution, then you should either open a new issue or ping me here if you have any new relevant insight.

locht commented 1 month ago

work for me!, upgrade version "react-native-screens": "3.25.0" (3.15.0 to 3.25.0) with react-native@0.69.7 classpath("com.android.tools.build:gradle:7.1.1") buildToolsVersion = "34.0.0" minSdkVersion = 23 compileSdkVersion = 34 targetSdkVersion = 34

    kotlin_version = '1.7.10'
locht commented 1 month ago

don't upgrader version kotlin_version because, Because it's easy to make small mistakes

2741147837 commented 2 weeks ago

为我工作!, 升级版本“react-native-screens”:“3.25.0”(3.15.0到3.25.0)使用 react-native@0.69.7 classpath(“com.android.tools.build:gradle:7.1.1”) buildToolsVersion =“34.0.0” minSdkVersion = 23 compileSdkVersion = 34 targetSdkVersion = 34

    kotlin_version = '1.7.10'

谢谢,这对我有用

Yangeok commented 1 day ago

Still can't be compiled..