Android使用SDK方法详解
Android 手机操作系统可以在模拟器中进行一些特定的修改以此满足用户的各种需求。那么如何能在模拟器中正确的应用Android使用SDK呢?我们将会在这里对这一应用技巧进行一个详细的介绍。
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 emulator usage: mksdcard [-l label] < size> < file> if < size> is a simple integer, it specifies a size in bytes if < size> is an integer followed by 'K', it specifies a size in KiB if < size> is an integer followed by 'M', it specifies a size in MiB D:\android-sdk\tools>mksdcard.exe -l sdcard 2048M sdcard.img
启动模拟器: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)
相关推荐
liusarazhang 2020-08-16
magic00 2020-08-03
Keepgoing 2020-08-03
孝平 2020-07-18
futurechallenger 2020-07-10
lyccsu 2020-07-08
xjp 2020-06-28
BigCowPeking 2020-06-28
QCkiss 2020-06-21
CallMeV 2020-06-08
绿豆饼 2020-06-03
yourFriend 2020-05-28
playis 2020-05-27
82599532 2020-05-26
Hannah 2020-05-26
csdnYF 2020-05-16
过时不侯的温暖 2020-05-08
wmd看海 2020-05-01
xiaoxiangyu 2020-04-29