Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android Build a Simple Android App with Java Testing and Debugging Running an App on a Device

JOSEPHINE MUFOWO
PLUS
JOSEPHINE MUFOWO
Courses Plus Student 158 Points

How to connect Mobicel Switch to Android Studio

How how do I connect my phone to Android Studio?My phone is called mobicel Switch.I want to build and run my Apps but I cannot connect my phone to the Android Studio.I have have connected the USB cable but the phone still does not appear

2 Answers

Hi there,

First, enable Developer Mode - go to Settings | General | About Phone and scroll down to the Build number. Tap that 5 times until you get the message "You are now a developer!".

Next in Settings | Developer Options (a new menu option which is now available) scroll down to 'USB Debugging' and enable that. Your Android Studio should now display your phone in the 'Select Deployment Target' dialog box which appears when you run your app.

Let me know how you get on.

Steve.

JOSEPHINE MUFOWO
JOSEPHINE MUFOWO
Courses Plus Student 158 Points

Hello Steve.I have done all that but the phone still does not appear

Have you enabled USB file transfer when connecting the device to the computer? When you try running your app from Android Studio with your device connected, what is displayed in the dialog box that appears?

JOSEPHINE MUFOWO
PLUS
JOSEPHINE MUFOWO
Courses Plus Student 158 Points

Yes I have enabled the USB file transfer but in the Android Studio it says 'Preview not available until a successful build'

OK - so your app hasn't successfully built yet. Do you get compiler errors when trying to run it? What are those errors?