react-native-keys icon indicating copy to clipboard operation
react-native-keys copied to clipboard

[Android] No such file or directory

Open HamoBoker opened this issue 1 year ago β€’ 4 comments

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 avatar Aug 16 '24 06:08 HamoBoker

πŸ‘‹ @HamoBoker Thanks for opening your issue here! If you find this package useful hit the star🌟!

github-actions[bot] avatar Aug 16 '24 06:08 github-actions[bot]

@HamoBoker did you find any solution for this?

ishan-sharma-me avatar Dec 15 '24 12:12 ishan-sharma-me

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?

atifaziz1 avatar Apr 22 '25 09:04 atifaziz1

Dear @numandev1 ,

I am waiting for your response,.

atifaziz1 avatar Apr 30 '25 13:04 atifaziz1