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

R8 task fails with missing StringConcatFactory #593

Closed
1 of 2 tasks
dhananjayspeed opened this issue Jul 21, 2024 · 1 comment
Closed
1 of 2 tasks

R8 task fails with missing StringConcatFactory #593

dhananjayspeed opened this issue Jul 21, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@dhananjayspeed
Copy link

Description

when set minifyEnabled to true in build.gradle file buildTypes {
release {
minifyEnabled true
}
}

and after publishing the library and using the library in react-native project getting ERROR: R8: Missing class java.lang.invoke.StringConcatFactory

Packages

  • create-react-native-library
  • react-native-builder-bob

Selected options

create-react-native-library

Link to repro

https://anyuseanylibrary

Environment

System:
OS: macOS 14.5
CPU: (8) arm64 Apple M1
Memory: 97.42 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.20.3
path: /opt/homebrew/opt/node@18/bin/node
Yarn:
version: 1.22.19
path: /usr/local/bin/yarn
npm:
version: 10.7.0
path: /opt/homebrew/opt/node@18/bin/npm
Watchman:
version: 2024.06.10.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.5
- iOS 17.5
- macOS 14.5
- tvOS 17.5
- visionOS 1.2
- watchOS 10.5
Android SDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.18034.62.2411.12071903
Xcode:
version: 15.4/15F31d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 21.0.3
path: /opt/homebrew/opt/openjdk@21/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.9
wanted: 0.73.9
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

@dhananjayspeed dhananjayspeed added the bug Something isn't working label Jul 21, 2024
@satya164
Copy link
Member

You'll need to configure proguard to keep any classes you need if you enable it. We don't configure it in the app - which is the same code as regular React Native projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants