No instrumentation runner InstrumentationTestRunner和INSTALL_FAILED_INSUFFICIENT_STORAG錯誤解決辦法

來源:互聯網
上載者:User

今天運行一個android小程式時,出現了兩個錯誤如下:(網上看到了兩個解決方案,可以湊效)

問題一:單擊“Android JUnit Test”運行後會出現如下警告:Warning: No instrumentation runner found for the launch, using   android.test.InstrumentationTestRunner.  

原因是:模擬器不能記住Androidmanifest的配置,在運行時需要重新設定回合組態。

配置步驟如下:  

1.在工程名字上點擊右鍵,選擇properties  
2.在Run/Debug setting中選擇要啟動並執行工程名字,點擊右邊的Edit,會進入下面的介面,在 instrumentation runner後面的下拉式清單中選擇android.test.InstrumentationTestRunner  

3.重新運行該測試單元。 

就不會出現上面的警告了

問題二:運行時出現Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE。執行工程時,提示上面的錯誤,還是記憶體問題。

解決辦法:把以前的apk檔案都給刪除了。

刪除方法一:命令 進入tools檔案夾下,adb shell "enter"  cd data"enter" cd app "enter" ls,就可以看見之前的apk檔案,用rm檔案名稱,就可以把它刪除。(模擬器要處在啟動並執行狀態下)

刪除方法二:

啟動模擬器,然後進入菜單settings->applications->mange applications-> select theapplication->select "unistall".

網上還有的解決辦法是增大記憶體空間,用命令啟動:emulator -avd MyAndroid -partition-size120,設定記憶體為120m,但是在我這裡不行,可能之前的apk檔案太多

在eclipse中設定啟動命令:(圖中著色部分)

轉載自:http://blog.sina.com.cn/s/blog_600c6eec0100sy91.html

http://www.cnblogs.com/tjpfly/archive/2011/05/25/2056717.html

問題三:Android SDK與ADT版本不對應,提示SDK tools版本過低,需要升級SDK管理器。

解決辦法:開啟Android SDK Manager,選擇Tools——Manage Add-on-sites..——User Defined Sites。然後添加網址 http://developer.android.com/sdk/index.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.