真機除錯時候,使用adb devices會出現不能識別出現:
同時在使用elipse除錯的時候也不能選擇真機,解決辦法:
1、設定usb許可權
$ lsusb
bus 001 device 002: id 8087:0024 intel corp. integrated rate matching hub
bus 002 device 002: id 8087:0024 intel corp. integrated rate matching hub
bus 003 device 002: id 17ef:6019 lenovo
bus 001 device 001: id 1d6b:0002 linux foundation 2.0 root hub
bus 002 device 001: id 1d6b:0002 linux foundation 2.0 root hub
bus 003 device 001: id 1d6b:0002 linux foundation 2.0 root hub
bus 004 device 001: id 1d6b:0003 linux foundation 3.0 root hub
bus 001 device 010: id 0bb4:0cac htc (high tech computer corp.)
bus 002 device 003: id 0c45:62f0 microdia
列表中,
bus 001 device 010: id 0bb4:0cac htc (high tech computer corp.) . 這一行為手機的usb使用埠,記錄一下,id為
0bb4:0cac
$sudo vim /etc/udev/rules.d/70-android.rules
加入以下內容:
subsystem=="usb", attrs=="0bb4", attrs=="0cac",mode="0666"
執行命令,重啟udev:
$sudo chmod a+rx /etc/udev/rules.d/70-android.rules
$sudo service udev restart
2、 重新啟動adb server
$adb kill-server
設定完成了,重新插入裝置
$ adb devices
list of devices attached
emulator-5554 device
ht13ltd01429 device
安卓開發 HttpClient使用
httpclient其實是乙個inte ce型別,httpclient封裝了物件需要執行的http請求 身份驗證 連線管理和其它特性。從文件上看,httpclient有三個已知的實現類分別是 abstracthttpclient,androidhttpclient,defaulthttpclient...
安卓開發 StrictMode使用
最新的android平台中 android 2.3起 新增加了乙個新的類,叫strictmode android.os.strictmode 這個類可以用來幫助開發者改進他們編寫的應用,並且提供了各種的策略,這些策略能隨時檢查和報告開發者開發應用中存在的問題,比如可以監視那些本不應該在主線程中完成的...
安卓開發 SoundPool的使用
使用方法 1.建立乙個soundpool public soundpool int maxstream,int streamtype,int srcquality streamtype 流的型別,一般為stream music 具體在audiomanager類中列出 srcquality 取樣率轉化...