react-native-keys
react-native-keys copied to clipboard
[Android] No such file or directory
Current behavior
hello, i'm facing issue running android on monorepo project, can't run file because of wrong path of node_modules
i have node_modules in monorepo root only, so is there a way to change the node_modules path on android
/bin/sh: PROJECT_ROOT/apps/rider/node_modules/react-native-keys/keysAndroid.js: No such file or directory
Thanks
Expected behavior
building and running android
Platform
- [X] Android
- [ ] iOS
React Native Version
0.75.1
React Native Compressor Version
Reproducible Steps And Demo
π @HamoBoker Thanks for opening your issue here! If you find this package useful hit the starπ!
@HamoBoker did you find any solution for this?
Dear @numandev1 ,
I have a couple of questions. I hope you reply as soon as possible regarding setup in Android.
We are not dependent on flavor. So the below code is useless in my case.
project.ext.keyFiles = [
debug: "keys.development.json",
release: "keys.staging.json",
]
Q1. What is the use of the above code?
As per documentaion json file should be in root of Project. Create a new file keys.development.json in the root of your React Native app.
I console the file path, and the path is logging it should be in the android/ folder. Here is a code snippet.
`android.applicationVariants.all { variant -> def buildType = variant.buildType.name def keyFileName = project.ext.keyFiles[buildType] ?: "keys.release.json"
def keyFile = rootProject.file(keyFileName) // π₯
if (!keyFile.exists()) {
println("β οΈ Warning: $keyFileName not found at ${keyFile.absolutePath}")
} else {
println("β
Using key file: ${keyFile.absolutePath}")
}
} `
Q2. Where should be exactly json file.? Q3. How does Android read the JSON files if we have multiple like keys.release.json and keys.staging.json?
Dear @numandev1 ,
I am waiting for your response,.