Friday, July 29, 2011

custom android build.xml

之前要改android的build.xml時
通常先在我自己的build.xml最後那 改 setup import="false"
然後再去把SDK裡的template copy出來
加到build.xml的後面

不過今天發現
可以不用那麼麻煩
import="false"也不用加
只要先把template裡面的你想要改的target  copy出來
貼到你的build.xml上
再自己改想要改的東西  就可以了

inspired by class loading example http://code.google.com/p/android-custom-class-loading-sample/

Tuesday, July 26, 2011

不能執行python script

從同事那拿到一個python script
而發現他跑這個script時都是
$>python test.py

想說 那我在最前面加個 #! /usr/bin/env python
然後$>chmod a+x test.py
所以我只要 $>./test.py就好了

但竟然.......
line 1: #!: command not found

最後用file來看看這個script
$>file test.py
test.py: UTF-8 Unicode (with BOM) Java program text, with CRLF line terminators

最後把內容copy到另一個新的test1.py
test1.py: UTF-8 Unicode (with BOM) Java program text, with CRLF line terminators

就好了........................................................