Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task :react-native-screens:compileReleaseKotlin FAILED #36119

Closed
Gabotron-ES opened this issue Feb 10, 2023 · 1 comment
Closed

Task :react-native-screens:compileReleaseKotlin FAILED #36119

Gabotron-ES opened this issue Feb 10, 2023 · 1 comment
Labels
Needs: Triage 🔍 Resolution: Issue in another tool or repo An issue that was opened against React Native but in reality is affecting another tool or library

Comments

@Gabotron-ES
Copy link

Description

Description

When doing a gradlew clean assembleRelease to get .aab file of my react-native appI get the following:

> Task :react-native-screens:compileReleaseKotlin FAILED
e: org.jetbrains.kotlin.util.KotlinFrontEndException: Exception while analyzing expression in (15,47) in C:/xampp/htdocs/WOO!/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchViewFormatter.kt

Attachments:
causeThrowable
java.io.FileNotFoundException: C:\xampp\htdocs\WOO!\node_modules\react-native-screens\android\build\intermediates\compile_r_class_jar\release\R.jar!/node_modules/react-native-screens/android/build/intermediates/compile_r_class_jar/release/R.jar!/com/swmansion/rnscreens/R.class

And:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-screens:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction

It seems .jar file seems missing, this started happening after I changed my app package name (I think...)

I tried upgrading kotlin version to 1.8.0 inside build.gradle but still getting the same error.

kotlinVersion = "1.8.0" //added this inside ext
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.0" //added this inside dependencies

My package.json file

"react-native": "0.68.5",
"react-native-screens": "^3.19.0"

I have been stuck with this for a while, I can't uninstall react-native-screens library since react-narive-navigation has a dependency on it (it seems)

Version

0.68.5

Output of npx react-native info

System:
OS: Windows 10 10.0.19044
CPU: (2) x64 AMD A9-9420 RADEON R5, 5 COMPUTE CORES 2C+3G
Memory: 2.75 GB / 7.11 GB
Binaries:
Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: Not Found
npm: 8.12.2 - C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Version 4.1.0.0 AI-201.8743.12.41.6858069
Visual Studio: Not Found
Languages:
Java: 11.0.14
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.68.5 => 0.68.5
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

  1. Changed package name of my app from com.appname tp com.enterprisename.packagename
  2. did a gradlew clean assembleRelease to get .aab file
  3. App fails to build when it gets to react-native-screens (error seems to be related to kotlin)

Snack, code example, screenshot, or link to a repository

https://stackoverflow.com/questions/75404806/react-native-cant-get-release-bundle-because-react-native-screens-kotlin-error

@cortinico
Copy link
Contributor

Hi,
Thanks for reporting this issue.

It seems like this issue is actually unrelated to React Native core as it's a failure to compile the library react-native-screens
Please open this issue against this other repository:

https://github.com/software-mansion/react-native-screens/issues

I'll be closing this but feel free to reopen if the other repo points back to us as a issue in the core of React Native.

@cortinico cortinico added the Resolution: Issue in another tool or repo An issue that was opened against React Native but in reality is affecting another tool or library label Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Resolution: Issue in another tool or repo An issue that was opened against React Native but in reality is affecting another tool or library
Projects
None yet
Development

No branches or pull requests

2 participants