如何重置Android 模擬器恢復至原廠設定

詳細官方說明文件:Android Emulator

摘錄官文件說明:如何重置Android 模擬器恢復至原廠設定

Emulator Startup Options

The emulator supports a variety of options that you can specify when launching the emulator, to control its appearance or behavior. Here's the command-line usage for launching the emulator with options:

emulator -avd <avd_name> [-<option> [<value>]] ... [-<qemu args>]                        




Category

Option

Description

Disk Images


-wipe-data                                                                       

Reset the current user-data disk image (that is, the file specified by -datadir and -data, or the default file). The emulator deletes all data from the user data image file, then copies the contents of the file at -inidata data to the image file before starting.


不知道這樣大家有沒有看懂???

HKT寫個圖+中文說明好了,

模擬器可以模擬Android手機裝置,也就是說可以不用買實體的機子,
也可以開發Android相關手機程式,當然如果有實體機子,那是最好的,
因為模擬器還滿遜的我覺得。
常常讓人弄的雞飛狗跳,明明沒問題,卻給你秀,發生無法處理的意外狀況。
後來查明原因,卻只是單純模擬器秀逗問題。讓人不免想唸唸人之初,性本善...

而如果你常用Android模擬器來開發程式,有時會遇到不可以避免的問題,
簡單講就是鬼擋牆,有時你可以讓Android模擬器恢復至原廠設定,來避免一些詭異的事。

那如何讓Android模擬器恢復至原廠設定呢?
在微軟作業系統下開發,可使用命令提示視窗,來下命令讓模擬器恢復至原廠設定。

首先你必須知道你要重置模擬器的大名,不知道的話,
可以至eclipse=>的Android SDK and AVD Manger,開啟後即可看到相關模擬器的大名,
 HKT的模擬器的大名當初設定為"A2.2",也就是說AVD Name為  "A2.2" ,因人而異,
看你當初取的名字。

然後開啟命令視窗,將路徑設置SDK tools底下,鍵入"emulator -avd a2.2 -wipe-data",
 這樣就可以讓Android模擬器恢復至原廠設定   

這個網誌中的熱門文章

2023 最新入門零基礎 Kotlin教學【從零開始學 Kotlin 程式設計】Kotlin 教學課程目錄 (Android Kotlin, IntelliJ IDEA, Android Studio, Android APP 開發教學)

最新入門零基礎 Java 教學【從零開始學 Java 程式設計】Java教學課程目錄 (IntelliJ IDEA 開發教學)

Android Studio 歷代版本下載點

nano 文字編輯器

2022 最新入門零基礎 Flutter教學 【Flutter 程式設計入門實戰 30 天】Flutter 教學課程目錄 (IntelliJ IDEA 開發教學)