In a previous blog post, we announced the launch of 4D for Android. But how to build, visualize and play with your Android app on your favorite virtual device? This blog post covers all these questions with answers and concrete examples.
Build your Android apps with just a click
4D for Android follows the same easy process as for 4D for iOS to build and run your apps. To build your iOS apps, you select the simulator you want your app to be built on, and you click the Build and Run button.
That’s exactly the same process for Android. If no virtual device is available, you are invited to create one. A Pixel 4 (Google smartphone) is then automatically created to ensure you a quick start building your android apps.
Add other virtual devices for Android
By default, the Pixel 4 guarantees you a first great app user experience and rendering. But you may want to try your app on other virtual devices that may have different resolutions. Okay, here is how!
Android SDK command-line Tools
First, open Android Studio, and from the welcome screen, click the Configure button and select the SDK Manager item.
Then from the SDK Tools tab, check and install the Android SDK command-line Tools (latest) if it’s not done already. By doing that, you will be able to visualize all your virtual devices directly from the 4D mobile Project Editor.
Create new virtual devices
To create a new virtual device, just click the Configure button from the Android Studio welcome screen and select AVD manager (Android Virtual Device Manager).
Then from here, you can create as many virtual devices as you want:
Back to the project editor, you can now select the virtual devices that you’ve just created!
The Google documentation is also there to help you manage your virtual devices. You are now ready to build your Android project on your favorite virtual device right from 4D. Don’t hesitate to give us feedback on the 4D forum.