Debugging reference for Android development real machine under Fedora

Source: Internet
Author: User

The method is simple. Note that not all models are available.

Let's talk about installing eclipse and ADT.

Built-in eclipse can meet the general use of javase, but do not know why, fedora17 installed ADT-20 problems.

Therefore, you need to go to the eclipse official website and install ADT on your own.

 

Which cannot be debugged directly:

[Luozhuang @ luozhuangvm tools] $ sudo./ddms
Error loading ddms preferences

(Ddms: 3585): GTK-warning **: gtk_widget_size_allocate (): attempt to allocate widget with width-5 and height 17

(Ddms: 3585): GTK-warning **: gtk_widget_size_allocate (): attempt to allocate widget with width-5 and height 17
09:30:20 E/ddms: insufficient permissions for Device
Com. Android. ddmlib. adbcommandrejectedexception: insufficient permissions for Device
At com. Android. ddmlib. adbhelper. setdevice (adbhelper. Java: 752)
At com.android.ddmlib.adbhelper.exe cuteremotecommand (adbhelper. Java: 373)
At com.android.ddmlib.device.exe cuteshellcommand (device. Java: 453)
At com. Android. ddmuilib. sysinfopanel. loadfromdevice (sysinfopanel. Java: 159)
At com. Android. ddmuilib. sysinfopanel. deviceselected (sysinfopanel. Java: 126)
At com. Android. ddmuilib. selectiondependentpanel. deviceselected (selectiondependentpanel. Java: 52)
At com. Android. ddms. uithread. selectionchanged (uithread. Java: 1756)
At com. Android. ddmuilib. devicepanel. policylisteners (devicepanel. Java: 772)
At com. Android. ddmuilib. devicepanel. policylisteners (devicepanel. Java: 760)
At com. Android. ddmuilib. devicepanel. Access $1100 (devicepanel. Java: 56)
At com. Android. ddmuilib. devicepanel $1. widgetselected (devicepanel. Java: 368)
At org. Eclipse. SWT. Widgets. typedlistener. handleevent (unknown source)
At org. Eclipse. SWT. Widgets. eventtable. sendevent (unknown source)
At org. Eclipse. SWT. Widgets. widget. sendevent (unknown source)
At org. Eclipse. SWT. Widgets. display. rundeferredevents (unknown source)
At org. Eclipse. SWT. Widgets. display. readanddispatch (unknown source)
At com. Android. ddms. uithread. runui (uithread. Java: 535)
At com. Android. ddms. Main. Main (main. Java: 117)

Many people say that because Linux does not have the root permission, we can see from the above results that sudo does not work.

Debugging on a real machine is simple: edit a configuration file, Set permissions, and restart the service:

[luozhuang@luozhuangVM tools]$ sudo gedit /etc/udev/rules.d/70-android.rules[luozhuang@luozhuangVM tools]$ sudo chmod 777 /etc/udev/rules.d/70-android.rules[luozhuang@luozhuangVM tools]$ sudo service udev restartRedirecting to /bin/systemctl  restart udev.service

The content of the 70-android.rules file is as follows:

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", MODE="0666"

At last, you need to re-insert your device and run ddms to see the device.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.