HOW TO RUN ANDROID APP ONLY FOR WINDOWS!!
SET UP YOUR DEVICE
- Enable USB debugging on your device.
- On most devices running Android 3.2 or older, you can find the option under Settings > Applications > Development.
- On Android 4.0 and newer, it’s in Settings > Developer options.Note: On Android 4.2 and newer, Developer options is hidden by default. To make it available, go toSettings > About phone and tap Build number seven times. Return to the previous screen to findDeveloper options.
RUN THE APP FROM ANDROID STUDIO FOR WINDOWS ONLY!!
- Select one of your project’s files and clickRun
from the toolbar.
- In the Choose Device window that appears, select the Choose a running device radio button, select your device, and click OK .
Android Studio installs the app on your connected device and starts it.
Make sure the Android SDK
platform-tools/
directory is included in your PATH
environment variable, then execute:$ adb install app/build/outputs/apk/app-debug.apk
On your device, locate MyFirstApp and open it.
RUN ON THE EMULATOR
Whether you’re using Android Studio or the command line, to run your app on the emulator you need to first create an Android Virtual Device (AVD). An AVD is a device configuration for the Android emulator that allows you to model a specific device.
CREATE AN AVD
- Launch the Android Virtual Device Manager:
- In Android Studio, select Tools > Android > AVD Manager, or click the AVD Manager icon
in the toolbar. The AVD Manager screen appears.
- Or, from the command line, change directories to
sdk/
and execute:tools/android avd
Note: The AVD Manager that appears when launched from the command line is different from the version in Android Studio, so the following instructions may not all apply.
- In Android Studio, select Tools > Android > AVD Manager, or click the AVD Manager icon
- On the AVD Manager main screen, click Create Virtual Device.
- In the Select Hardware window, select a device configuration, such as Nexus 6, then clickNext.
- Select the desired system version for the AVD and click Next.
- Verify the configuration settings, then clickFinish.
For more information about using AVDs, seeManaging AVDs with AVD Manager.
RUN THE APP FROM ANDROID STUDIO FOR WINDOWS ONLY!!
- In Android Studio, select your project and click Run
from the toolbar.
- In the Choose Device window, click the Launch emulator radio button.
- From the Android virtual device pull-down menu, select the emulator you created, and click OK.
It can take a few minutes for the emulator to load itself. You may have to unlock the screen. When you do, My First App appears on the emulator screen.
No comments:
Post a Comment