標籤:android style http io color ar os 使用 for
環境:
NDK版本r8,eclipse和Android使用的是adt-bundle-windows-x86打包版本比較方便,
作業系統為windows8.1
一、NDK的編譯
1、源碼
NDK的examples目錄有Hello-GL2的源碼,大家可以先使用它。
2、將樣本工程匯入到eclipse中
3、編譯設定
a、選中工程,eclipse中菜單windows->prefereces-》android-》NDK
設定NDK的路徑
b、選中工程,eclipse中菜單project->properties
單擊builder, CDT Builder選中
單擊c/c++Bulder,Builder setting 中,build command重新設定為ndk-build NDK_DEBUG=1 V=1(NDK_DEBUG=1 V=1主要為後面的native調試作準備)
c、run 工程即可
二、native 調試
1、建立模擬器
模擬器版本不要太高,我的版本是android2.3.3,否則會出現no debug symbol found的錯誤
2、選中工程,右鍵快顯功能表,單擊native support
3、選中工程,右鍵快顯功能表,單擊 Run as android applicaton,先將程式裝上
4、選中工程,右鍵快顯功能表,單擊 debug as native applicaton
4、就可以在調試c++代碼了
注意點:
1、真實機器可能會出現no debug symbol found的錯誤
2、模擬器版本太高也會出現no debug symbol found的錯誤
3、將下載的的其他版本的sdk放在\sdk\platforms中
4、需要先run as android application先將app裝上
錯誤類型:
由於android版本太高出現的error類型
1、no debugging symbols found
2、No symbol table is loaded. Use the "file" command
3、Error accessing memory address 0x1a66: Input/output error 等等
Android+NDK+CDT+eclipse+OPenGL ES的編譯與native調試 解決no debugging symbols found