You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR | Running multiple emulators with the same AVD
ERROR | is an experimental feature.
ERROR | Please use -read-only flag to enable this feature.
Stop any running emulators and retry.
If the emulator appears too large or extends beyond your screen boundaries:
Click on the three dots (...) in the emulator's toolbar
Enable 'Show window frame around device' in the settings
The emulator will now appear in a resizable window
Drag the window edges to adjust the emulator to your preferred size
Running Your Application
Development Mode:
dx serve --platform android
Wait for "Build completed successfully" message (may take over 1 minute)
VS Code
Android Studio
Physical Device Setup:
Enable Developer Options on your Android device
Enable USB Debugging
Enable File Transfer mode
Connect device via USB
Verify connection:
adb devices
adb devices
List of devices attached
2yu346b7ab device
emulator-5554 host
Run the application:
dx serve --platform android
Accept the .apk installation prompt on your device
Building APK:
Debug Version
To build a debug version of your application:
dx build --platform android
The debug APK will be generated at: \target\dx\app_name\debug\android\app\app\build\outputs\apk\debug\app-debug.apk
Release Version
To build a release version of your application:
dx build --platform android --release
The release APK will be generated at: \target\dx\app_name\release\android\app\app\build\outputs\apk\debug\app-debug.apk
Note: The initial release APK file size will be approximately 15 MB for a basic application. This is typical for Rust-based Android applications due to included libraries and runtime components.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Mobile App Development on Windows for Android Platform Using Rust and Dioxus Library
This guide is applicable for version 0.6 (currently v0.6.0-alpha.5). Install using:
Installing Android Studio
Download and install the latest version of Android Studio from the official website:
https://developer.android.com/studio
Create a new Dioxus project or open an existing one:
Configure Android SDK:
Setting Up an Emulator
Select "Create Virtual Device"
Choose your desired hardware (e.g., Pixel 9 Pro XL)
Click Next
Select System Image:
Configure AVD:
Installing JDK 23
Remove Previous Versions:
Install JDK 23:
Setting Environment Variables
Click on Environment Variables ...
Set System Variables:
Add the following:
Note: Replace
username
with your Windows username and adjust NDK (28.0.12433566) version as neededSet User Path Variables:
Add these paths to the user's PATH variable:
This ensures the new environment variables are properly loaded in all development tools.
Running the Emulator
Command Line Method:
Android Studio Method:
Open Device Manager
Click the play button next to your desired virtual device
Note: If the emulator freezes, it's often quicker to:
VS Code Method:
If you get a multiple emulators error:
Stop any running emulators and retry.
If the emulator appears too large or extends beyond your screen boundaries:
Running Your Application
Development Mode:
Wait for "Build completed successfully" message (may take over 1 minute)
VS Code
Android Studio
Physical Device Setup:
Building APK:
Debug Version
To build a debug version of your application:
The debug APK will be generated at:
\target\dx\app_name\debug\android\app\app\build\outputs\apk\debug\app-debug.apk
Release Version
To build a release version of your application:
The release APK will be generated at:
\target\dx\app_name\release\android\app\app\build\outputs\apk\debug\app-debug.apk
Note: The initial release APK file size will be approximately 15 MB for a basic application. This is typical for Rust-based Android applications due to included libraries and runtime components.
Beta Was this translation helpful? Give feedback.
All reactions