<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    posts - 167,  comments - 30,  trackbacks - 0
    或許困擾很多Android開發者最大的問題莫過于Bug的修改了,調Bug 改Bug,想想都頭疼,以下就是一位對Bug很有經驗的開發者總結出來的有關Android錯誤的解決方法。

    1 android java.net.UnknownHostException: Unable to resolve host "...": No address associated 錯誤
    我在android開發的時候經常會遇到這個錯誤,一般來說,造成這種錯誤的最普遍情況有兩種:

    1.android設備網絡連接沒打開,例如3G網絡和WIFI網絡

    所以,如果遇到這種錯誤時,請先查看網絡是否已正常連接.

    2.Manifest文件沒有標明網絡訪問權限

    如果確認網絡已經正常連接并且還是出這種錯誤的話,那么請看下你的Manifest文件是否標明應用需要網絡訪問權限,如果沒標明的話,也訪問不了網絡,也會造成這種情況的.

    //網絡訪問權限

    2 Failed to install *.apk on device 'emulator-5554': timeout

    錯誤提示:

    Failed to install helloworld.apk on device 'emulator-5554': timeout

    或者

    the user data image is used

    原因:

    由于模擬器已經開啟而沒有關閉或者非法關閉引起的。

    解決方法:

    刪除 C:Documents and SettingsAdministrator.androidavd對應版本.avd

    下所有以.lock結尾的文件夾。

    或者

    Failed to install *.apk on device *:

    timeout Launch canceled!

    還有一種辦法:

    在window->preferences->Android->DDMS->ADB connection time out (ms):

    將這個值設置的大一些,默認為5000,設置成500000,然后就OK了。

    3 This Android SDK requires Andriod Developer Toolkit version 20.0.0 or above
    打開Eclipse(Android 開發環境),發現以下報錯:

    1346673984_5685.jpg

    圖片顯示信息為:Android SDK要求ADT(Android Developer Toolkit)版本在20.0.0或以上版本,檢測到當前版本為18.0.0,請更新最新的ADT。

    出現這樣的提示,根本原因是Eclipse啟動時檢測E:Program Filesandroid-sdk-windowstoolslibplugin.prop文件 文件內容為:

    begin plugin.prop

    plugin.version=20.0.0

    # end plugin.prop

    這就很容易理解了,需求插件版本為20.0.0,這時候我們只需要改成:

    begin plugin.prop

    plugin.version=18.0.0

    # end plugin.prop

    OK了,重新啟動下Eclipse,看看是不是解決了這個問題

    4 [Accessibility] Missing contentDescription attribute on image

    今天使用了下ADT 16.0 在定義一個ImageVIew的時候 總是提示這個[Accessibility] Missing contentDescription attribute on image警告,雖說可以不理 但總是感覺怪怪的,在網上一搜 發現原來這是ADT 16.0的新特性,在一些沒有文本顯示的控件里,如imageView和imageButton等,ADT會提示你定義一個android:contentDescription屬性,用來描述這個控件的作用。英文原文如下,如有翻譯的不對的地方,敬請批評指正。

    Resolved this warning by setting attribute android:contentDescription for my ImageView

    android:contentDescription="@string/desc"

    Android Lint support in ADT 16 throws this warning to ensure that image widgets provide a contentDescription

    This defines text that briefly describes content of the view. This property is used primarily for accessibility. Since some views do not have textual representation this attribute can be used for providing such.

    Non-textual widgets like ImageViews and ImageButtons should use the contentDescription attribute to specify a textual description of the widget such that screen readers and other accessibility tools can adequately describe the user interface.

    5 java.lang.NoClassDefFoundError: com.baidu.mapapi.BMapManager解決辦法

    用百度地圖,可能把工程復制了些位置 出錯了

    解決辦法:

    1.右擊項目->properties->Java Build Path->Order and Export,在需要引用的包前面打勾。

    2.Project->Clean...

    clipboard.png

    6 eclipse中提示 No Completions Available,Alt+/不自動提示

    window-> Preferences-> Java-> Editor-> Content Assist-> Advanced

    上面的選項卡Select the proposal kinds contained in the 'default' content assist list中添加【Java Non-Type Proposals】

    clipboard1.png

    轉載自:http://mobile.51cto.com/abased-406993.htm

    posted on 2013-08-20 09:44 David1228 閱讀(401) 評論(0)  編輯  收藏 所屬分類: Andriod

    只有注冊用戶登錄后才能發表評論。


    網站導航:
     

    <2013年8月>
    28293031123
    45678910
    11121314151617
    18192021222324
    25262728293031
    1234567

    常用鏈接

    留言簿(4)

    隨筆分類

    隨筆檔案

    文章檔案

    新聞分類

    新聞檔案

    相冊

    收藏夾

    Java

    Linux知識相關

    Spring相關

    云計算/Linux/虛擬化技術/

    友情博客

    多線程并發編程

    開源技術

    持久層技術相關

    搜索

    •  

    積分與排名

    • 積分 - 359858
    • 排名 - 154

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 免费黄色福利视频| 国产99久久久久久免费看| 亚洲综合色区中文字幕| 美女尿口扒开图片免费| 国产99视频精品免费专区| 免费观看黄网站在线播放| 国产亚洲精品不卡在线| 亚洲黄色免费网站| 亚洲国产无线乱码在线观看 | 午夜免费福利在线| 亚洲日韩国产精品第一页一区| 亚洲婷婷在线视频| 国产在线观看免费视频软件| 在线精品免费视频| 久久精品国产亚洲AV麻豆网站| 午夜成人无码福利免费视频| 国产成人精品免费视频大全麻豆 | 国产亚洲大尺度无码无码专线| 亚洲另类视频在线观看| 免费91最新地址永久入口| 四虎影视永久免费视频观看| 亚洲中文字幕无码mv| 99视频有精品视频免费观看 | 亚洲欧洲在线观看| 成人片黄网站色大片免费观看cn| 日韩免费视频观看| 亚洲人成7777| 免费人妻av无码专区| 亚洲JIZZJIZZ妇女| 国产午夜亚洲精品午夜鲁丝片| 久久永久免费人妻精品下载| 亚洲精品成a人在线观看☆| 亚洲国产天堂久久综合| 免费国产a理论片| 免费在线观看一级毛片| 野花香高清在线观看视频播放免费| 亚洲电影在线播放| 久草视频免费在线| 亚洲国产日产无码精品| 免费人成视频x8x8入口| 91热久久免费精品99|