Back

使用Tishadow的注意事项(things to be noted using tishadow)

发布时间: 2015-01-21 05:15:00

Tishadow的原理:

1. 先从PC 端把APK包发给手机

2. 在手机端启动的APP,实际上是一个壳儿,你的手指每次点击手机端之后,手机会把请求通过无线网络发送给PC端。

所以,tishadow启动时,务必注意:

1. 傻瓜启动方式( $ ti build ... --shadow) 下,默认端口是3000,所以,如果出现启动失败 (Tishadow server stops... ) ,就要检查你的Rails应用是否占用了3000端口

2. 如果发现启动时,要选择IP地址时,

    2.1 如果你的设备是Genymotion 虚拟设备,就要选择 vboxnet

    2.2 否则,选择另一个IP(192.168.x.x)

3. 启动之前,确保你的真实设备跟PC是处于同一个"局域网"下的。 也就是说,PC端这时候不要连接CHINA Unicom无线网络。

4. 由于Tishadow是在监听 xml, tss, js等文件,所以,确保你的编辑器不要产生临时文件。(例如emacs会产生.#index.xml文件,直接引起 tishadow退出)

5. (估计必定会有)如果发现有 INSTALL_FAILED_MISSING_SHARED_LIBRARY的问题: 

ARM Translation Installer v1.1 - https://dl.dropboxusercontent.com/u/14700716/XDA-Shares/Genymotion-ARM-Translation_v1.1.zip (Mirrors)

Download the correct GApps for your Android version:

Google Apps for Android 4.3 - http://goo.im/gapps/gapps-jb-20130813-signed.zip

Google Apps for Android 4.2 - http://goo.im/gapps/gapps-jb-20130812-signed.zip

Google Apps for Android 4.1 - http://goo.im/gapps/gapps-jb-20121011-signed.zip

2) Next Open your Genymotion VM and go to the Homescreen

3) Now Drag&Drop the Genymotion-ARM-Translation.zip onto the Genymotion VM window.

4) It should say "File transfer in progress", once it asks you to flash it click 'OK'

5) Now Reboot your VM using ADB or an app like ROM Toolbox. If nescessary you can simply close the VM window, but I don't recommend it.

6) Once you're on the Homescreen again Drag&Drop the gapps-jb-20130813-signed.zip(or whatever version you got) onto your VM, and click 'OK' when asked

2月16日更新:

其他注意事项:

生成的 apk 文件不能是中文,否则会报错.

如果修改了 配置文件( tiapp.xml 啥的), 最好要重启. 否则会报错

如果修改了针对平台的tss 内容( 例如增加 '#my_label[platform=android]') 就要重启 tishadow. 否则会报错

修改 xml, tss, js 文件时, 如果app 没有打开(或者被我们人为关掉了) , tishadow 不会自动帮我们重启.  因为这时候 tishadow会认为 设备已经失去连接. 需要我们手动的 在手机上打开app, 这时候 tishadow 就会告诉我们: device reconnected. 然后 内容自动出现. 

Back