- Install Android Studio
- The first step of getting set up for Android development is installing Android Studio
- USB Debugging
- USB debugging allows us to setup your phone to be used as a test device for your app
- Setup Webmaker App
- All the steps needed to get a local version of the Webmaker App repository running locally on your Android phone
- Chrome Remote Debugging
- This will help you start debugging our app using the Chrome developer tools
- Manually install adb and Android SDK
- Only do this if you're unable to use adb after install Android Studio, or you want to manually install other SDKs
You will need to make sure you have Java 1.7 and JDK installed for your platform.
You can download Android Studio from https://developer.android.com/sdk. This might take a while.
After it has installed successfully, you should see the following screen:
<iframe width="775" height="436" src="https://www.youtube.com/embed/idRdI2iN2Ek" frameborder="0" allowfullscreen></iframe>-
In order to get started testing apps on a phone, we need to first enable developer mode by tapping the Build number 7 times in
Settings > About
-
Once enabled on our phone, we can then allow USB Debugging in settings
-
This will allow us to plug our phone into our computer via USB and run
adb devices
to make sure your device is recognized -
This guide has additional information on setting up your phone for USB Debugging
-
Clone the Webmaker App repo mozilla/webmaker-app
-
Once we have a local copy of the
webmaker-app
runnpm install
and thennpm start
to build/watch changes -
In Android studio, choose "Open an existing Android project"
-
Select the webmaker-app folder, and press open
-
You may need to set your Gradle path to
/Application/Android Studio.app/Contents/gradle/gradle-2.2.1
-
Connect your device via USB, and press the "run" button:
If you installed Android Studio, you can probably skip these steps.
<iframe width="775" height="436" src="https://www.youtube.com/embed/-d28E21PuRc" frameborder="0" allowfullscreen></iframe>For this project we will need the SDK command line tools. We can download and install from developer.android.com or via brew:
brew install android-platform-tools
Depending on where you have installed it, you may need to add the following to your .bash_profile: (ANDROID_HOME
should refer to wherever you installed the SDK)
export ANDROID_HOME=~/Library/Android/sdk
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Open a new window and type:
adb version
If you see something like Android Debug Bridge version 1.0.32
you have adb installed properly. If you don't, see this page on MDN for more help.
If you installed Android Studio, you can probably skip this step.
<iframe width="775" height="436" src="https://www.youtube.com/embed/10XXnYteAqA" frameborder="0" allowfullscreen></iframe>To run our app we'll need to download Android 19. To do this we'll download the SDK manager from developer.android.com.
We'll also need to make sure Java and Java Development Kit are installed in order to run the Android
command.