Pin*_*nki 227
简单地说,您使用ADB,如下所示:
adb install <path to apk>
Run Code Online (Sandbox Code Playgroud)
另请参阅在Android Debug Bridge中安装应用程序一节.
小智 71
如果您可以通过手机访问Gmail帐户,那么一种简单的方法(就最小化设置而言)就是将.apk文件邮寄到该Gmail帐户.
然后,如果您从手机上的原生Gmail应用访问该帐户,则会识别该附件是应用并提供"安装"按钮.
根据其他响应,此方法还要求您在设备上选择USB调试.
试试这个 - 非常容易;-)
小智 39
我引用Hello Android因为我不能说它更好;-)
您需要在手机上启用USB调试(通过启动"设置"应用程序并选择" 应用程序" >" 开发" >" USB调试"),如果尚未安装Android USB设备驱动程序(仅限Windows),然后将手机插入电脑使用手机附带的USB线.
如果模拟器窗口已打开,请将其关闭.只要插入手机,Eclipse就会在手机上加载并运行应用程序.您需要右键单击该项目,然后选择Run As > Android Application.
小智 20
如果你没有SDK或者你在这里设置第三方应用程序是另一种方式:
将APK文件放入Android SDK中的tools文件夹中,并在命令提示符中提供工具路径并使用以下命令:
adb install "name".apk file
Run Code Online (Sandbox Code Playgroud)
直接连接Android设备,然后在设备中选择USB调试选项.Eclipse将自己找到您的设备,然后运行代码.
或者,将您的APK文件粘贴到Android SDK platform-tools文件夹中,然后从命令提示符处将其安装如下:
D:......../platform-tools> adb install yourfile.apk.
Run Code Online (Sandbox Code Playgroud)
外部设备,我们可以使用:
adb install file.apk
Run Code Online (Sandbox Code Playgroud)
要么 adb install -r file.apk
adb install [-l] [-r] [-s] [--algo <algorithm name> --key <hex-encoded key> --iv <hex-encoded iv>] <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)
('-s' means install on SD card instead of internal storage)
('--algo', '--key', and '--iv' mean the file is encrypted already)
Run Code Online (Sandbox Code Playgroud)
在设备内部,我们可以使用:
pm install file.apk
Run Code Online (Sandbox Code Playgroud)
要么 pm install -r file.apk
pm install: installs a package to the system. Options:
-l: install the package with FORWARD_LOCK.
-r: reinstall an exisiting app, keeping its data.
-t: allow test .apks to be installed.
-i: specify the installer package name.
-s: install package on sdcard.
-f: install package on internal flash.
-d: allow version code downgrade.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
229629 次 |
最近记录: |