Code: Select all
android {
...
namespace "com.myapp"
flavorDimensions += "default"
productFlavors {
create("production") {
dimension "default"
resValue "string", "build_config_package", "com.myapp"
...
}
create("staging") {
dimension "default"
applicationIdSuffix ".staging"
resValue "string", "build_config_package", "com.myapp"
...
}
create("development") {
dimension "default"
applicationIdSuffix ".development"
resValue "string", "build_config_package", "com.myapp"
...
}
}
defaultConfig {
applicationId "com.myapp"
...
}
buildTypes {
debug {
...
}
release {
...
}
}
}
Code: Select all
"scripts": {
"android:staging": "react-native run-android --mode=stagingDebug --appIdSuffix \"staging\"",
"android:staging-release": "react-native run-android --mode=stagingRelease --appIdSuffix \"staging\"",
"android:dev": "react-native run-android --mode=developmentDebug --appIdSuffix \"development\"",
"android:dev-release": "react-native run-android --mode=developmentRelease --appIdSuffix \"development\"",
"android:prod": "react-native run-android --mode=productionDebug",
"android:prod-release": "react-native run-android --mode=productionRelease",
"android": "react-native run-android",
...
},
Code: Select all
BUILD SUCCESSFUL in 16s
491 actionable tasks: 19 executed, 472 up-to-date
info Connecting to the development server...
info Starting the app on "emulator-5554"...
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.myapp.development/com.myapp.MainActivity }
✨ Done in 26.22s.
Wenn ich die App von Bundler aktualisiere, heißt es:
Code: Select all
info Reloading app...
warn No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB.