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

JOSEPHINE MUFOWO
PRO
JOSEPHINE MUFOWO
Pro 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

Steve Hunter
MOD
Steve Hunter
Treehouse Moderator 56,079 Points

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
Pro Student 158 Points

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

Steve Hunter
Steve Hunter
Treehouse Moderator 56,079 Points

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
PRO
JOSEPHINE MUFOWO
Pro 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'

Steve Hunter
Steve Hunter
Treehouse Moderator 56,079 Points

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