Skip to main content

Development Setup

This guide demonstrates how to set up your development environment for Android mobile development. Regardless of framework choice, ensure you follow these steps to start developing.

Prerequisites

1. Install Android Studio

Install Android Studio to build apps and manage your device/emulator, following the official Android developer docs. If you're planning on developing with React Native, then follow the React Native Android environment setup guide.

2. Setup Device/Emulator

To test and preview your app as you develop, you can build and deploy your app to an Android device or emulator in Android Studio. Follow official Android developer documentation to create an emulator or deploy your app to a hardware device.

3. Install a wallet app

The Mobile Wallet Adapter (MWA) library allows your dApp to connect and interface with Wallet Apps that implement the MWA protocol. For testing, you want to have an MWA-compatible wallet on the same device or emulator as your dApp.

1. Download, build, and install fakewallet

The fakewallet app is a 'fake' Mobile Wallet Adapter compliant wallet. Install it on your Android emulator or device. It does not store persistent keypairs, and the wallet is "reset" each time the app is exited.

Installation steps
  1. Clone the Mobile Wallet Adapter repo, containing the fakewallet app from the github repository
git clone https://github.com/solana-mobile/mobile-wallet-adapter.git
  1. In Android Studio, Open project > Navigate to the cloned directory > Select mobile-wallet-adapter/android/build.gradle

  2. After Android Studio finishes loading the project, select fakewallet in the build/run configuration dropdown in the top right

fakewallet build

  1. After it builds successfully, you should see the app on your Android device or emulator.

2. Install real wallet apps

fakewallet was created for implementation reference and quick testing purposes. You should also test your dApp with popular MWA-compatible wallet apps like Phantom, Solflare, and Ultimate.

You can install these onto an emulator by using an emulator with Google Play Store support. From there, you can login to your Google account and search for Phantom or Solflare to install it onto the emulator.

Choose a development framework

Although, the Solana Mobile Stack is primarily written in native Android, we also have support for popular mobile development frameworks.

These are our official SDKs that are maintained by the Solana Mobile team.

Community SDKs

These SDKs are actively maintained, supported, and used by members and developers of our community. Click to learn more about the capabilities supported by each, the state of development, and how to get started.