从命令提示符安装apk文件?

我想使用Windows命令行安装文件。首先,我想在编译所有.jar文件之后为不使用Eclipse的Android应用程序创建.apk文件而进行构建。

有谁知道在不使用Eclipse的情况下只能通过命令行来完成此工作。


慕虎7371278
浏览 837回答 3
3回答

慕雪6442864

您可以使用ant在命令行上进行构建。请参阅本指南。然后,可以adb在命令行上使用进行安装。adb install -r MyApp.apk该-r标志将替换现有应用程序。

子衿沉夜

使用Android调试桥命令行工具,adb例如:adb install filename.apk。一个很好的参考adb是在这里install [options] <PATH>&nbsp; &nbsp; Installs a package (specified by <PATH>) 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 <INSTALLER_PACKAGE_NAME>: Specify the installer package name.-s: Install package on the shared mass storage (such as sdcard).-f: Install package on the internal system memory.-d: Allow version code downgrade.uninstall [options] <PACKAGE>&nbsp; &nbsp;Removes a package from the system.Options:-k: Keep the data and cache directories around after package removal.
打开App,查看更多内容
随时随地看视频慕课网APP