graceting

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

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)作为虚拟驱动,安装方式是:
 
  1. Start the Android SDK Manager, select Extras and then select Intel Hardware Accelerated Execution Manager.
  2. After the download completes, execute <sdk>/extras/intel/Hardware_Accelerated_Execution_Manager/IntelHAXM.exe.
  3. Follow the on-screen instructions to complete installation.

 

运用上述分析2并运行IntelHAXM.exe.在进行安装过程中出现问题,因为VT-X没有安装,查看sdk管理器中发现确实未安装,安装后解决问题,happy!

posted on 2014-10-21 11:39  IT-tingting  阅读(196)  评论(0编辑  收藏  举报