npx init with "--package-name" makes Android application crash on runtime #42280
Labels
Platform: Android
Android applications.
Resolution: Fixed
A PR that fixes this issue has been merged.
Description
If you initialise an application with "npx init" and provide a package name with "--package-name", then the built Android app will crash on startup.
No such issue exists on iOS.
No such issue on 0.72 versions.
I have narrowed this down to how
MainActivity.kt
is generated. It generates the following function:However, it should be:
Manually changing that function and rebuilding resolves the issue.
Steps to reproduce
npx [email protected] init MyApp --version 0.73.2 --package-name com.mycompany.MyApp
cd MyApp/android
./gradlew assembleRelease
React Native Version
0.73.2
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
n/a
Screenshots and Videos
No response
The text was updated successfully, but these errors were encountered: