Skip to Content
Android Developer Tools深入精要
book

Android Developer Tools深入精要

by Mike Wolfson
July 2014
Intermediate to advanced
248 pages
5h 19m
Chinese
GoTop Information, Inc.
Content preview from Android Developer Tools深入精要
使用模擬器
|
37
第四章:使用實體裝置與模擬器
第四章
使用實體裝置與模擬器
[Page-39]
使用模擬器
前個章節我們學到如何新增模擬器,現在我們來談談它的使用。模擬器是個很有用的
工具,它讓測試變得更簡單,也讓開發者可以模擬許多在現實生活中較難實現的狀況。
例如,如果你正在寫一個地圖程式,你需要測試的地點可能遍布在世界各地,而實際
前往這些地點是不切實際的(雖然頗有趣)。模擬器可以模擬網路配置設定、硬體與
軟體的配置,與感測器的事件。模擬器讓你不需真正地擁有那些你想測試的裝置。例
如,你可以使用模擬器來配置不同大小的螢幕與記憶體設定。這章將介紹如何使用模
擬器來有效率地測試不同的配置參數。
大多數情況,模擬器與實體裝置是用一樣的方法在與
ADT
工具連接互動。也就是說,
我們這章討論的操作可用一樣的方式執行在模擬器與實體裝置中。大部分情況,實體
裝置會比模擬器來得受限的多,因為一些選項(像是更改網路配置)被系統服務商鎖
起來了。
你可能會使用許多實體裝置與模擬器的不同組合,來仔細地測試。你可以執行任意多
個不同的模擬器與實體裝置;若你同時想執行很多模擬器,你會需要一台高效能的電
腦(取決於配置,每部模擬器可專屬使用超過
1 GB
的記憶體)。在測試的過程中,同
時使用多個模擬器與實體裝置很常見。需要注意的是,模擬器不支援某些操作,例如
模擬加速度感測器,或其他感測器的模擬(如指南針功能)。
[Page-40]
你可以複習第
23
頁的「功能及其限制」,來判斷模擬器是否符合你的需要。
38
|
第四章:使用實體裝置與模擬器 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Android 高效能多執行緒

Android 高效能多執行緒

Anders Goransson
深入淺出 jQuery

深入淺出 jQuery

Ryan Benedetti, Ronan Cranley
HTML5 錦囊妙計

HTML5 錦囊妙計

Christopher Schmitt, Kyle Simpson

Publisher Resources

ISBN: 9789863470861