![android studio install two versions of same app android studio install two versions of same app](https://brownbarter240.weebly.com/uploads/1/2/5/1/125103720/234734520.png)
- Android studio install two versions of same app android#
- Android studio install two versions of same app windows#
It will handle all of those things for you.įull details in the repo, but in short: $ npm run react-native-build-utils icons # generates dev icons based on prod items $ npm install -save-dev react-native-build-utils If that sounds like a lot of work, it's just because it is, that's why I've authored a package to automate the process.
![android studio install two versions of same app android studio install two versions of same app](https://www.onlinetutorialspoint.com/wp-content/uploads/2018/03/30-min-768x554.png)
When it's time to release a new apk, or test production version, you need to reverse all the changes we've just made. So your current configuration is what you should use for development. We now have two apps running side by side, and can easily distinguish between them. Open ROOT/android/app/src/main/AndroidManifest.xml and probably know what's next. Now that we got our dev icons, let's tell our app to use them instead of the production ones.
Android studio install two versions of same app windows#
On windows you can use photoshop or an image editing tool of your choice for the job. Or just install the npm package ( authored by a really awesome guy btw ) ) to do that automagically for you: $ npm install -save-dev react-native-build-utils $ convert android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -shave 12x12 -bordercolor '#EF4142' -border 12 android/app/src/main/res/mipmap-xxhdpi/ic_launcher_dev.png $ convert android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -shave 10x10 -bordercolor '#EF4142' -border 10 android/app/src/main/res/mipmap-xhdpi/ic_launcher_dev.png $ convert android/app/src/main/res/mipmap-hdpi/ic_launcher.png -shave 8x8 -bordercolor '#EF4142' -border 8 android/app/src/main/res/mipmap-hdpi/ic_launcher_dev.png $ convert android/app/src/main/res/mipmap-mdpi/ic_launcher.png -shave 6圆 -bordercolor '#EF4142' -border 6 android/app/src/main/res/mipmap-mdpi/ic_launcher_dev.png If you are running linux, you can use the following commands to auto generate icon versions for your dev app: $ sudo apt-get install imagemagick php5-imagick Let's do that now: Step 3: setting different icon for dev app We could still do better by changing the icon though. Open ROOT/android/app/src/main/res/values/strings.xml and change: Step 2: setting different title for dev app we have no way to distinguish between the two. You should now see the two apps side by side:īut. $ react-native run-android -configuration=release ROOT/android/app/src/main/java/com/memorynback/MainApplication.java.ROOT/android/app/src/main/java/com/memorynback/MainActivity.java.
![android studio install two versions of same app android studio install two versions of same app](https://i.stack.imgur.com/Rgs3K.jpg)
ROOT/android/app/src/main/AndroidManifest.xml.ROOT/android/app/BUCK # two changes here.Step 1: install the dev version on the appĭo a global find and replace in your project: com.appname -> com.appnameDev You have a working react-native project with a production version of the app installed on your device.When developing a mobile app, you'd want to have both dev and prod versions installed on your device, and be able to distinguish between them easily at a glance, like so:
![android studio install two versions of same app android studio install two versions of same app](https://android-coffee.com/wp-content/uploads/2016/02/webview-activity.jpg)
Android studio install two versions of same app android#
NOTE: ATM this tutorial only supports android environment.