Getting Started with Android

by Jon (Updated on 2015-10-23)


Contents

System Requirements

To test and publish to Android, you need the following.

The rest of the software requirements are fetched by Stencyl directly from Google's servers.

Is there an Android "simulator"?

No emulator or simulator is available for testing Android games on your computer.

If you don’t have an Android device, we recommend picking up a cheap one, such as a Moto E or Moto G. We do not recommend purchasing off-brand devices since you may be unable to test your games on them

Step 1: Set up your Device

If you haven’t tested apps on your device before, you’ll need to do a few things to it before you begin.

Install a USB Driver

For some devices, especially those made by Samsung, a USB driver (called an OEM USB Driver) has to be installed for your PC/Mac to recognize your device.

Google maintains a page that lists all of these devices out.

Turn on USB Debugging

USB Debugging must be enabled, otherwise your device will be unable to communicate with your computer. The location of this option varies depending on what version of Android and what device you have.

Do a Google search for USB debugging [YOUR_DEVICE_HERE]

Turn on USB Mass Storage

If you don't turn off USB Mass Storage, your device will be treated like a USB flash drive, rather than a proper Android device. Again, the location of this option varies depending on what version of Android and what device you have.

One trick that sometimes works is to plug your device in - if you're lucky, your device will ask you whether you want to Turn off USB Mass Storage.

Do a Google search for USB Mass Storage [YOUR_DEVICE_HERE]

Step 2: Install the Java JDK

Android requires the Java JDK (Java Development Kit), version 1.6 or later, in order to build and sign apps. You must install this on your own, although Stencyl will make a best effort to flag this if you don’t have it installed.

Step 3: Install the Rest

The rest of the requirements (the Android SDK) are automatically downloaded by Stencyl. This is triggered when you attempt to run an Android app for the first time.

If all goes well, you'll see Stencyl download all of the required packages. This takes a while due to the large file sizes.

Step 4: Test on your Device

After the Android packages finish downloading, Stencyl may ask you to reboot. If it requests that, do that, reopen the game and then run the game again.

If all goes well, your game will build for a while and then finally launch the app directly on your device.

Tip: Monitor the Log Viewer (View > Log Viewer) to track the progress of your game's build. The first build will take some time depending on how fast your computer is.

Troubleshooting

While downloading the Android SDK in Step 3, the download stops. None of my apps run - how can I reset the installation process?

Go to the following location in the main menu: Debug > Android > Reinstall Android SDK

My game doesn't launch on my device. It gets stuck at "Sending to Device"

The good news is that if you get this far, it's out of Stencyl's hands - the Android SDK is in control at this point. Failure to launch usuall indicates a hardware / operating system issue. Here are some common causes.

If you continue to have issues, view our forum discussion for additional ideas.

My game crashes immediately on the device.

My game crashes immediately on a Samsung Galaxy (anything recent)

Enable 3x scale for your game since the flagship Galaxy line requires this scale. This change has to be done in two places.

FAQ

Can I use an existing / external install of the Android SDK?

Not at this time. We'd like to support this in the future.

How do I view the official device logs outside of Stencyl?

Use Device Monitor, which can be launched from Stencyl (under Debug > Android > Launch Device Monitor).

What version of the Android SDK does Stencyl use?

As of late 2015, we're up to API Level 22 (Lollipop).