這篇文章主要講解了“Android中SDK方法怎么使用”,文中的講解內(nèi)容簡(jiǎn)單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來(lái)研究和學(xué)習(xí)“Android中SDK方法怎么使用”吧!
鹽城網(wǎng)站建設(shè)公司創(chuàng)新互聯(lián),鹽城網(wǎng)站設(shè)計(jì)制作,有大型網(wǎng)站制作公司豐富經(jīng)驗(yàn)。已為鹽城上1000家提供企業(yè)網(wǎng)站建設(shè)服務(wù)。企業(yè)網(wǎng)站搭建\外貿(mào)網(wǎng)站建設(shè)要多少錢,請(qǐng)找那個(gè)售后服務(wù)好的鹽城做網(wǎng)站的公司定做!
1. 在Android模擬器上安裝和卸載APK包
adb install [-l] [-r] < file> - push this package
file to the device and install it('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data)adb uninstall [-k] < package> - remove this app
package from the device('-k' means keep the data and cache directories)
安裝:
adb install filename.apk D:\android-sdk\tools>adb install filename.apk * daemon not running. starting it now * * daemon started successfully * 347 KB/s (111196 bytes in 0.312s) pkg: /data/local/tmp/filename.apk Success
卸載:
adb uninstall filename.apk
或者
adb shell rm data/app/filename.apk
2. 在Android模擬器上使用sd card
生成sdcard鏡像文件:
mksdcard: create a blank FAT32 image to be
used with the Android emulatorusage: mksdcard [-l label] < size> < file>
if < size> is a simple integer, it specifies
a size in bytesif < size> is an integer followed by 'K', it
specifies a size in KiBif < size> is an integer followed by 'M', it
specifies a size in MiBD:\android-sdk\tools>mksdcard.exe -l sdcard
2048M sdcard.img
啟動(dòng)模擬器:emulator -sdcard sdcard鏡像文件
例如: emulator -sdcard sdcard.img
將資源放入到sdcard里面: adb push source-file /sdcard
例如:
D:\android-sdk\tools>adb push NOTICE.txt /sdcard 1088 KB/s (156733 bytes in 0.140s)
使用命令adb shell 查看sdcard目錄:
D:\android-sdk\tools>adb shell # ls sdcard NOTICE.txt
感謝各位的閱讀,以上就是“Android中SDK方法怎么使用”的內(nèi)容了,經(jīng)過(guò)本文的學(xué)習(xí)后,相信大家對(duì)Android中SDK方法怎么使用這一問(wèn)題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!