1.用Eclipse搭建Android開發環境和創建第一個Android項目(Windows平臺)
鏈接閱讀http://www.cnblogs.com/allenzheng/archive/2012/11/10/2762379.html
搭建環境中的不同之處:
(1)我在安裝過程中,在安裝ADT插件時并沒有顯示NDK plugins,但是并不影響后續工作,只要選中developer tools即可
(2)安裝SDK過程中,點擊http://developer.android.com/sdk/index.html未能下載像博客中所寫的SDK 包,而是Google 的 集成SDK Manager.exe,此時只要選擇SDK Manager.exe所在的目錄即可,然后點擊SDK Manager.exe進行安裝即可,在preference中點擊查看時也和預期效果一樣
(3)創建AVD模擬器時,界面和以往不太一樣,此時需要選擇device,而不是屏幕分辨率,一般device模擬器和后來創建activity時所選擇的版本要保持一致,否則會提示錯誤,此時只需要在代碼中修改android:minSdkVersion="8"為你所要的版本值即可
2.建立第一個項目HelloAndriod后運行遇到的錯誤
(1):?Error : Could not find HelloAndroid.apk
解決方法:根據這個解決方法解決。鏈接:http://stackoverflow.com/questions/3645545/error-could-not-find-helloandroid-apk
?(2):運行AVD遇到“Emulator] could not get wglGetExtensionsStringARB”原因分析: device space不足。
解決辦法:
選擇AVD-Edit-Device中,選擇一個較小的尺寸就可以了。畢竟,我們只是測試而已。
另外,可以將Intener storage, Memory等設置的大一些,應該就可以了。
?
分析2:wglGetExtensionsStringARB屬于OpenGL ES,此錯誤是由對OpenGL ES的支持不全引起。OpenGL ES?(OpenGL for Embedded Systems) 是?OpenGL?三維圖形?API 的子集,針對手機、PDA和游戲主機等嵌入式設備而設計。
?
簡言之,OpenGL ES用于顯示以及GPU加速,它也應用于Android emulator中,作為硬件加速的一部分。
?
現代CPU為提高virtual machines的運行效率提供了一些擴展,Android emulator利用這些擴展加速執行速度,因此對運行系統的CPU有一定要求:
?
- Intel Virtualization Technology (VT, VT-x, vmx) extensions
- AMD Virtualization (AMD-V, SVM) extensions (only supported for Linux)
?
無法支持的機器將無法運行使用這些擴展的emulator。
?
故而當出現這個error時,需要檢查:
?
- 機器支持Virrualization Technology
- VM Acceleration正確配置:
- ???? windows下使用Intel Hardware Accelerated Execution Manager (Intel HAXM)作為虛擬驅動,安裝方式是:
- Start the Android SDK Manager, select?Extras?and then select?Intel Hardware Accelerated Execution Manager.
- After the download completes, execute?
<sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.exe
.- Follow the on-screen instructions to complete installation.
?
運用上述分析2并運行IntelHAXM.exe
.在進行安裝過程中出現問題,因為VT-X沒有安裝,查看sdk管理器中發現確實未安裝,安裝后解決問題,happy!