最近不知道為什麼 Eclipse 去新建一個 Android APP 一直無法成功
- src/底下沒任何new MainActivity.java
- layout/底下沒有 default 的 layout.xml
總是停在 Finish 按鈕的頁面 (Can't create a new Android application)
以下是我的鬼打牆過程
1. 重新安裝Eclipse (Re-install eclipse) … Fail
2. 重新安裝ADT plug-in (Re-install Android Development Tool plug-in) … Fail
3. 重新安裝SDK tools (Try download other SDK tools) … Fail
4. 重新安裝JDK7 (Try to re-install JDK 7)… Fail - 原本以為是Java Complier 問題, 結果還是...
5. 重新安裝JRE7 (Try to re-install JRE 7)… Fail - JRE說 關我啥事!
6. 把Eclipse 的workspace刪除或換一個目錄 (Remove workspace of eclipse) … Fail
7. 最後一招 直接檢查 workspace/.metadata/.log 這個檔案
- 發現它指向另一個 eclipse. - 從這裡發現我除了本身有自行到官網下載Eclipse 除此之外
還下載了Google 的Android整合開發工具(ADT bundle) 總算找到原因 但也花了一天...
最後 留下一個 Eclipse 然後再到 commend line mode 去以clean mode執行
#eclipse -clean
就這樣
我的Android APP建立精靈終於可以建一個新的APP了
2014年5月27日 星期二
2012年2月8日 星期三
2011年6月24日 星期五
MAC OS X上的 Beyond compare-like 應用程式
在MAC 寫程式 或是要比對文件所需的compare tool
找了很久 找到了一套免費的
DiffMerge
http://www.sourcegear.com/diffmerge/index.html
可以取代Win/Linux 上的 Beyond compare...(<--為啥你不出MAC版的)
推薦給您
標籤:
MAC,
Programming
2011年5月12日 星期四
Angry Birds 也可以在 Google Chrome瀏覽器上玩囉~
Angry birds 這個在 iPhone, Android平台上熱門的遊戲
現在也搬到 Google Chrome web 瀏覽器上玩囉
網址在此 https://chrome.google.com/webstore/detail/aknpkdffaafgjchaibgeefbgmgeghloj?hl=en-US#
要記得把網址打到 Google Chrome 瀏覽器上.
Google Chrome 瀏覽器下載網址:
http://www.google.com/chrome/index.html?hl=zh_tw&brand=CHMB&utm_campaign=zh_tw&utm_source=zh_tw-ha-apac-tw-sk&utm_medium=ha
2011年4月26日 星期二
計算檔案行數
通常想到計算檔案行數 第一個想到的就是 wc 這支command(在linux上)
wc 我猜是word count的簡寫...當然他不只可以算字數 也可以算行數
對於沒事想要看看自己程式碼寫了多少行或是多少字的人 是個方便的工具
先來看看他的help
#wc --help
Usage: wc [OPTION]... [FILE]...
or: wc [OPTION]... --files0-from=F
Print newline, word, and byte counts for each FILE, and a total line if
more than one FILE is specified. With no FILE, or when FILE is -,
read standard input.
-c, --bytes print the byte counts
-m, --chars print the character counts
-l, --lines print the newline counts
--files0-from=F read input from the files specified by
NUL-terminated names in file F;
If F is - then read names from standard input
-L, --max-line-length print the length of the longest line
-w, --words print the word counts
--help display this help and exit
--version output version information and exit
Report wc bugs to bug-coreutils@gnu.org
GNU coreutils home page:
General help using GNU software:
Report wc translation bugs to
簡單的說 要算某支檔案多少字 多少行 就用
#wc -w [file name] 或是 #wc -w * (表示目錄下所有檔案累計)
要算行數 也很簡單
#wc -l [file name] 或是 #wc -l * (表示目錄下所有檔案累計)
若是想要連sub-directory(所有子目錄都統計的話) 就用
#wc -l `find [folder name] -type f` 搭配find指令 可以視需求統計您需要的檔案類型
以上 應該是對於純文字檔比較適用
要用binary檔案來count 請自行想辦法~(阿 我也不知道你要count啥)
wc 我猜是word count的簡寫...當然他不只可以算字數 也可以算行數
對於沒事想要看看自己程式碼寫了多少行或是多少字的人 是個方便的工具
先來看看他的help
#wc --help
Usage: wc [OPTION]... [FILE]...
or: wc [OPTION]... --files0-from=F
Print newline, word, and byte counts for each FILE, and a total line if
more than one FILE is specified. With no FILE, or when FILE is -,
read standard input.
-c, --bytes print the byte counts
-m, --chars print the character counts
-l, --lines print the newline counts
--files0-from=F read input from the files specified by
NUL-terminated names in file F;
If F is - then read names from standard input
-L, --max-line-length print the length of the longest line
-w, --words print the word counts
--help display this help and exit
--version output version information and exit
Report wc bugs to bug-coreutils@gnu.org
GNU coreutils home page:
General help using GNU software:
Report wc translation bugs to
簡單的說 要算某支檔案多少字 多少行 就用
#wc -w [file name] 或是 #wc -w * (表示目錄下所有檔案累計)
要算行數 也很簡單
#wc -l [file name] 或是 #wc -l * (表示目錄下所有檔案累計)
若是想要連sub-directory(所有子目錄都統計的話) 就用
#wc -l `find [folder name] -type f` 搭配find指令 可以視需求統計您需要的檔案類型
以上 應該是對於純文字檔比較適用
要用binary檔案來count 請自行想辦法~(阿 我也不知道你要count啥)
2010年11月3日 星期三
[Android] 讓App或是System設定能夠寫入某Property的權限
找到 system/core/init/property_service.c
找到 struct {
const char *prefix;
unsigned int uid;
unsigned int gid;
} property_perms[] = {
裡如要加入某APP或System service可以寫入 "ABCD.XX.XX"的權限
加入
{ "abcd.xx.", AID_APP, 0 },
{ "abcd.xx.", AID_SYSTEM, 0 },
就可以啦
在此作個紀錄 以免每次都要再找或問人
2010年10月25日 星期一
[工作] Wireshake 使用筆記
記錄一下 最近用這東西抓封包
(1) 要filter 某IP 可以用 ip.src == xx.xx.xx.xx
(2) ip.src 是來源IP address.
(3) ip.dst 是目的IP address.
(4) udp.port == 1900 就可以filter SSDP的封包 抓upnp 的log很好用
紀錄一下
訂閱:
文章 (Atom)
