實作C++程式移植至Androud NDK
5/18, 2014
開啟eclipse發生「Failed to create the java virtual machine」的錯誤,刪除eclipse.ini就可以開啟了
但開啟之後竟然無法回應,網路上怎麼沒人有跟我一樣的錯誤呢,現在是eclipse開得起來但完全無法動作,有找到幾個方法試試
1. 檢查 workspace\.metadata\.plugins\org.eclipse.core.resources\.projects\PROJECT_NAME
目錄中.snap 的文件全部刪除, 再重啟 Eclipse。
markers.snap
syncinfo.snap
2. 檢查 eclipse.exe 同一目錄下的 eclipse.ini , 需要增加下面參數, 會跑得比較順
-vmargs
-Xms256m
-Xmx512m
-XX:PermSize=256M
-XX:MaxPermSize=256M
-XX:+UseParallelGC
3.
- 先進工作管理員強制關閉 Eclipse 的 process
- 開啟檔案總管 (記得要顯示隱藏檔)
- 移動至 workspace\.metadata\.plugins\org.eclipse.core.resources 目錄中並删除文件 .snap
- 也有建議刪除 workspace\.metadata\.lock
- 重新開啟 Eclipse。
4.
- 先進工作管理員強制關閉 Eclipse 的 process
- 開啟檔案總管 (記得要顯示隱藏檔)
- 移動至 workspace\.metadata\.plugins\ 目錄
- 將 org.eclipse.core.resources 重新命名為 org.eclipse.core.resources.old
- 重新啟動 Eclipse,關閉所有已編輯中之程式碼分頁 (會顯示找不到程式碼)
- 關閉 Eclipse
- 刪除剛剛建立的 org.eclipse.core.resources 資料夾
- 將資料夾 org.eclipse.core.resources.old 改回原本的 org.eclipse.core.resources
- 重新啟動 Eclipse
我試第一個,就可以正確開啟了,之後不要再傻傻刪掉eclipse.ini會變不回來,連開都開不起來,回到第一個問題。
貼了跟VC上有編譯成功的code果不其然的出錯,天底下果然沒有白吃的午餐,果然要在debug一次,程式的移植好煩喔ˊ_>ˋ
OpenCV Error: Unsupported format or combination of formats (type=0) in void cv::flann::buildIndex_(void*&, const cv::Mat&, const cv::flann::IndexParams&, const Distance&) [with Distance = cvflann::L2<float>, IndexType = cvflann::Index<cvflann::L2<float> >], file /home/reports/ci/slave_desktop/50-SDK/opencv/modules/flann/src/miniflann.cpp, line 315
結果是檔案路徑搞錯
下午一直出現ERROR 模稜兩可,在前面加個window.h即可
至於svm會出現model supports probability estimate, but disabled in prediction.不知道是不是錯誤,若不是那等等可以測android程式惹