bamlab / react-native-make

A collection of everyday React Native CLI tools
MIT License
762 stars 89 forks source link

Script not properly searching for "MainActivity.java" #13

Closed skizzo closed 5 years ago

skizzo commented 5 years ago

Hi,

the set-splash command doesn't work if the folder structure leading to MainActivity.java is not the default one / has been changed. In my case, the actual path of MainActivity.java is:

./android/app/src/main/java/com/nerdybirdy/boilerplate/MainActivity.java
                            com.nerdybirdy.boilerplate <- package name

This is because I renamed my a app using react-native-rename, which inserts the "extra folder" when changing the bundle name to "com.nerdybirdy.boilerplate"

The script is searching for the file in a directory based on the "name" value of the package.json, which leads to it failing to find the file:

./android/app/src/main/java/com/nbboilerplate/MainActivity.java
                            com.nbboilerplate <- not the package name, but "com" + packageJson.name

I guess a solution would be to control/override the path leading to MainActivity.java with an extra command-line parameter. Would that be possible to add to your super helpful toolset? :)

Thanks!

mmmmoj commented 5 years ago

same issue

yleflour commented 5 years ago

Same as #10, will update the issue from there