Setting up a Device for Development
With an Android-powered device, you can develop and debug your Android applications just as you would on the emulator. There are just a few things to do before you can start.
- Declare your application as "debuggable" in your Android Manifest.
In Eclipse, you can do this from the Application tab when viewing the Manifest (on the right side, set Debuggable to true). Otherwise, in theAndroidManifest.xml
file, add android:debuggable="true"
to the <application>
element.
- Turn on "USB Debugging" on your device.
On the device, go to the home screen, press MENU, select Applications > Development, then enable USB debugging.
- Setup your system to detect your device.
- If you're developing on Windows, you need to install a USB driver for adb. Follow the steps below for Installing the WinUsb Driver.
- If you're developing on Mac OS X, it just works. Skip this step.
- If you're developing on Ubuntu Linux, you need to add a rules file:
- Login as root and create this file:
/etc/udev/rules.d/51-android.rules
.
For Gusty/Hardy, edit the file to read:
SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666"(我用了这个有效)
For Dapper, edit the file to read:
SUBSYSTEM=="usb_device", SYSFS{idVendor}=="0bb4", MODE="0666"
- Now execute:
chmod a+rx /etc/udev/rules.d/51-android.rules
You can verify that your device is connected by executing adb devices
from your SDK tools/ directory. If connected, you'll see the device name listed as a "device."
If using Eclipse, select run or debug as usual. You will be presented with a Device Chooser dialog that lists the available emulator(s) and connected device(s). Select the device to install and run the application there.
If using the Android Debug Bridge (adb), you can issue commands with the -d
flag to target your connected device.
分享到:
相关推荐
Time for action – setting up your Android device on Windows and Mac OS X Developing with an Android device on Linux Time for action – setting up your Android device on Ubuntu Troubleshooting a ...
The material also covers setting up Linux for mobile application development, the difference between developing on a mobile Internet device and a regular desktop environment, step-by-step tutorials, ...
In this clear and informative guide, you will be taken on a whirlwind tour of iOS application development with Xamarin, from setting up a development environment on your PC or Mac to testing and ...
With Pro MEAN Stack Development you will quickly learn everything needed to work effectively with MEAN, from setting up your toolstack to rolling out your free servers, and deploying on any device....
Show my location app: Creating a map project, setting required permissions, accessing GPS device and showing real time location on the map. 6. S.O.S. sender app: Adding SMS functionality, setting ...
Beginning Windows Phone 7 Development starts with the basics, walking you through the process of downloading and setting up the right development tools, including Visual Studio, Expression Blend, ...
With the Apple Watch being widely regarded as a success, all eyes are now on Google to provide a similar device for its users. Keep your skills ahead of the competition and be one of the first to ...
If you are a web developer who wants to build hybrid mobile app development using the Ionic framework, then this comprehensive course is best-suited for you. What You Will Learn Get to know about ...
From beginners, to those who are experienced making video games, this book goes through the steps of using Unity 5 to make a game from the ground up and setting the game up with iTunes Game Center ...
With Pro MEAN Stack Development you will quickly learn everything needed to work effectively with MEAN, from setting up your toolstack to rolling out your free servers, and deploying on any device....
Beginning Windows Phone 7 Development starts with the basics, walking you through the process of downloading and setting up the right development tools, including Visual Studio, Expression Blend, ...
We also cover the setting up of the development environment and create a simple Hello World application for your device and emulators. Chapter 2, Looking Good – The Graphical Interface, takes a ...
2 Setting Up Your Android Development Environment 37 Configuring Your Development Environment 37 Configuring Your Operating System for Device Debugging 39 Configuring Your Android Hardware for ...
Chapter 7: Setting Up a Terminal Emulator Chapter 8: Talking to Your ARTIK Chapter 9: Network Configuration Chapter 10: Configuring and Upgrading Chapter 11: Programming Your ARTIK Chapter 12: Using ...
Android Studio offers a myriad of tools for developers such as enhanced intellisense and device emulation. This book provides a quick and easy to read format; introduces the reader to these key tools...
the book begins with an overview of the Mobile Linux landscape and then moves through setting up, developing, packaging and building a distribution for a mobile device. ,解压密码 share.weimo.info
Setting Up an Android 5 Wearables Application Development Workstation Chapter 3. A Foundation for Android Wearables Chapter 4. Exploring Android Studio Chapter 5. Android Virtual Devices Chapter 6. ...
What You Will Learn Install and configure Android SDK and ADB Analyze Android Permission Model using ADB and bypass Android Lock Screen Protection Set up the iOS Development Environment - Xcode and ...
Chapter 2 : Call Me, Text Me Setting Up Your Device Creating a Project Creating the Application Descriptor Writing the Code Packaging Your Application As an APK File and Installing It on the Device ...
Tutorial #7 - Setting Up the Action Bar Android’s Process Model Activities and Their Lifecycles Tutorial #8 - Setting Up An Activity The Tactics of Fragments Tutorial #9 - Starting Our Fragments ...