51-android.rules — 一個檔案搞定Ubuntu上Eclipse不識別Android手機的問題

來源:互聯網
上載者:User

項目首頁:http://code.google.com/p/51-android/

如果你在Ubuntu下用android真機開發android應用時,你可能會遇到一個問題。那就是,你的手機無法在eclipse中正確識別,導致無法正常安裝調試android應用。

根據官方以及網上的資料,我總結出了徹底解決這個問題的方法。具體操作如下:

1、點擊下載下面的檔案,解壓出來。

  51-android.zip  
23.9 KB

2、解壓該檔案。用文字編輯器開啟“51-android.rules”,將這裡面的OWNER="snowdream" ,替換成OWNER="您的系統使用者名稱"。儲存。

3、將檔案 “51-android.rules”,拷貝到/etc/udev/rules.d/ 目錄下。參考命令如下:

 sudo cp 51-android.rules /etc/udev/rules.d/

4、重啟udev

sudo service udev restart

5、把android手機重新插拔一次。

6、在終端運行以下命令:

adb devices

運行結果:

snowdream@snowdream:~$ adb devicesList of devices attached HC24NPG00384device

設定成功。

注:

1、如果通過上面的方法還無法調試,請記錄您的手機品牌和型號,以及在終端運行以下命令的結果(android手機串連上pc),並反饋給我。

2、參考資料:

Ubuntu上Eclipse不識別Android手機的解決方案              http://www.cnblogs.com/AndroidManifest/archive/2011/12/09/2281635.html
Udev                                                                                      http://wiki.cyanogenmod.com/wiki/Udev
Using Hardware Devices                                                   http://developer.android.com/guide/developing/device.html
51-android.rules to autorun Android's adb server         http://www.joescat.com/linux/android_rules.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.