Is it required to have the same folder structure as the Package Name in react-native android

I have seen in many react native projects MainActivity.kt file is located at the same path as the package name of app.

If the package name is “com.example.app” then MainActivity.kt file is placed at android/app/src/main/java/com/example/app/MainActivity.kt

and in some projects it is located at android/app/src/main/java/com/appName/MainActivity.kt and package name is different like com.androidexample.appname.

so if I would need to change package name then is it required to change the folder name also ?