Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在构建/启动android应用程序之前,在mac终端上运行shell脚本_Android_Eclipse_Terminal_Android Sdk 2.3_Android Sdk Tools - Fatal编程技术网

在构建/启动android应用程序之前,在mac终端上运行shell脚本

在构建/启动android应用程序之前,在mac终端上运行shell脚本,android,eclipse,terminal,android-sdk-2.3,android-sdk-tools,Android,Eclipse,Terminal,Android Sdk 2.3,Android Sdk Tools,以下是我想要实现的目标:- 我有一个shell脚本文件。该文件生成一些文件和文件夹,并将它们放在我的Android应用程序的Finder where assets文件夹中 每次我更改使用shell脚本生成的文件中的某些内容时,我都需要从终端运行该脚本文件,然后构建、安装、运行我的Android应用程序 谁能给我一个建议,在每次构建安卓应用程序之前,我的shell脚本都会执行并生成最新的文件,然后这些文件就可以被安卓应用程序使用 谢谢听起来你想不断地重建android应用程序。虽然您可以使用ssh

以下是我想要实现的目标:-

我有一个shell脚本文件。该文件生成一些文件和文件夹,并将它们放在我的Android应用程序的Finder where assets文件夹中

每次我更改使用shell脚本生成的文件中的某些内容时,我都需要从终端运行该脚本文件,然后构建、安装、运行我的Android应用程序

谁能给我一个建议,在每次构建安卓应用程序之前,我的shell脚本都会执行并生成最新的文件,然后这些文件就可以被安卓应用程序使用


谢谢

听起来你想不断地重建android应用程序。虽然您可以使用ssh连接到mac并运行脚本,甚至可以通过TCP over ADB或mac上的守护进程捕获的日志消息来触发脚本,但这种方法可能不是最好的方法。通过网络提供数据以供运行时下载/缓存,而不是在中编译,怎么样?如果手机位于Mac可路由的网络上,或者通过某个internet文件服务器,您可以直接执行此操作。实际上,我只想让eclipse在运行android应用程序之前运行一个脚本,然后再运行它,或者在安装它之前,可能会自动执行以下操作?如果是后者,听起来您可能想查看ant构建,了解如何使用ADB安装应用程序,然后通过Intent启动它们-基本上与Eclipse/ADT的功能相同,但采用可编写脚本的形式。当我单击Run As->Android应用程序时,在启动应用程序之前,我的脚本应该会运行,为此,只需在Eclipse项目配置中添加一个定制的预构建步骤。诚然,弄清楚细节是一件痛苦的事情,但这就是选择的目的。