Closed Gabotron-ES closed 1 year 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?
Hi, @Gabotron-ES, would you mind checking out
kotlinVersion = "1.6.21"
(same version for Kotlin Gradle Plugin)
This is the version we use inside the library and test with.
Moreover you should definitely try out standard approach - reinstall the dependencies: rm -fr node_modules yarn.lock && yarn install
and then try to build.
I've tried to build react-native-screens
with react-native@0.68.5
and it seems to be working fine. This indicates that this is likely some misconfiguration on your side.
To be able to help you in more concrete wat I would need a repository with a reproduction.
Tried it but getting the same error:
e: org.jetbrains.kotlin.util.KotlinFrontEndException: Exception while analyzing expression at (15,47) in C:/xampp/htdocs/WOOO!/node_modules/react-native-screens/android/src/main/java/com/swmansion/rnscreens/SearchViewFormatter.kt
Attachments:
expression.kt
R.id.search_src_text
at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.logOrThrowException(ExpressionTypingVisitorDispatcher.java:253)
at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.lambda$getTypeInfo$0(ExpressionTypingVisitorDispatcher.java:224)
It happens after I change package name of app, followed this tutorial:
https://classnstudy.com/how-to-rename-app-and-change-package-name-in-react-native-for-android/
@Gabotron-ES, do you think it is possible for you to provide a reproduction of this issue? It is rather hard to guess what is unusual about your setup, especially that I have not encountered this issue earlier.
I had a similar screens:compileReleaseKotlin
failure with:
react-native-screens@3.20.0
react-native@0.64.4
ext.kotlinVersion = '1.3.50'
Bumping to Kotlin to 1.6.21
resolved this for me.
I had a similar screens:compileReleaseKotlin failure with:
react-native-screens@3.22.0 react-native@0.71.7 ext.kotlinVersion = '1.8.21' Bumping to Kotlin to 1.8.21 resolved this for me.I had a similar screens:compileReleaseKotlin failure with:
I have same issue when make ./gradlew bundleRelease, my react-native-screens@3.22.0 and I changed ext.kotlinVersion = '1.8.21', still same issues. any fixed for this ??
Any Solutions?
I had same issue when compiling android, I solved it by this method https://www.youtube.com/watch?v=7Fhp_1ZxQeg&ab_channel=SgtSam
if it happened after name change, go to mainactivity,kt mainapplication.kt files and at top change your old package name with new one. it should resolve the problem. also update react-native rename global pkg so you dont face this problem again
Hey I solved this issue by upgrading the react-native-screens, i think it was the conflict in the kotlin version mentioned in the build.gradle under node moduls -> react-native-screens-> android and the one i was using in the build.gradle of the root project. (that is android -> build.gradle).
After days and days of trying everything. I just decided to do this and it fixed the problem.
Steps to fix: I deleted my android folder. Created a new temp react native project copied the new android folder over
( Thank you @ahmed-raza12 for this next part )
Ran these commands to rename everything:
sudo npm install -g react-native-rename
react-native-rename "{project name}"
react-native-rename "{project name}" -b com.{project name}.{project name}
Hey! 👋
This is the version we use inside the library and test with.
Moreover you should definitely try out standard approach - reinstall the dependencies:
rm -fr node_modules yarn.lock && yarn install
and then try to build.
Thank you Doing this worked for me
rm -fr node_modules package-lock.json && npm install
Description
When doing a gradlew clean assembleRelease to get .aab file of my react-native appI get the following:
And:
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.
My package.json file
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)
Steps to reproduce
Snack or a link to a repository
https://stackoverflow.com/questions/75404806/react-native-cant-get-release-bundle-because-react-native-screens-kotlin-error
Screens version
3.19.0
React Native version
0.68.5
Platforms
Android
JavaScript runtime
None
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Release mode
Device
Real device
Device model
No response
Acknowledgements
Yes