`
zhubin215130
  • 浏览: 142355 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

[转]Setting up a Device for Development

阅读更多

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.

  1. 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.

  2. Turn on "USB Debugging" on your device.

    On the device, go to the home screen, press MENU, select Applications > Development, then enable USB debugging.

  3. 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:
      1. 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"

      2. 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.

 

分享到:
评论

相关推荐

    Professional Ubuntu Mobile Development

    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, ...

    Android.App.Development.in.Android.Studio.Java.Android.Edition.For.Beginners.pdf

    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 ...

    Linux device driver 3nd(EN)

    - Guidance on setting up a development environment suitable for writing device drivers, including tools, compilers, and debugging utilities. - Instructions on configuring the kernel for development ...

    Xcode_Build_Setting_Reference

    This setting controls whether a `PkgInfo` file should be generated for the application. The `PkgInfo` file contains metadata about the application, such as its type and subtype, which can be useful ...

    Beginning Windows Phone 7 Development

    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, ...

    Mastering.Android.Wear.Application.Development

    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 ...

    Ionic : Hybrid Mobile App Development

    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 ...

    Learning Unity Android Game Development

    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 ...

    Android.Studio.Game.Development.Concepts.and.Design.14842171

    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...

    英文原版-Professional Ubuntu Mobile Development 1st Edition

    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

    Mobile.Device.Exploitation.Cookbook.1783558725

    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 ...

    Android Studio 3.2 Development Essentials, Kotlin Edition

    2. Setting up an Android Studio Development Environment 3. Creating an Example Android App in Android Studio 4reating an sngdroid vurtual bevice tsvb in Android tudlo 6. ATouroftheAndroid studio user ...

    developing android application with adobe air.part3.rar

    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 ...

Global site tag (gtag.js) - Google Analytics