Android学习笔记03-搭建Win8下的Android开发环境

时间:2021-07-23 12:29:44

一  配置环境变量

(绿色文字标出代码,路径换为自己的SDK路径)

ANDROID_HOME =  C:\software\adt-bundle-windows-x86_64-20140702\sdk

ANDROID_PLATFORM_TOOLS = C:\software\adt-bundle-windows-x86_64-20140702\sdk

ANDROID_TOOLS = C:\software\adt-bundle-windows-x86_64-20140702\sdk\tools

最后在PATH变量中添加(很重要,一定要3个都添加):;%ANDROID_HOME%;%ANDROID_PLATFORM_TOOLS%;%ANDROID_TOOLS%

Vmware使用技巧

在VMware11虚拟操作系统Windows8中会遇到的问题:

1)启动Win8时会报 “虚拟化的Intel VT-x/EPT需要首选模式IntelVT-x/EPT”

解决办法在vmware中开启Intel VT-x,编辑虚拟机,选择”硬盘“ -> “处理器”,在虚拟化引擎中选择 “Intel VT-x或AMD-V”. 保存设置,然后一切正常。

2)如何进入Win8 Biso ?

参考Windows8使用技巧。

Windows8使用技巧

1) Win8怎么进入 BIOS?

需要组合键 Fn+F2或Fn+F12.

2) Win8中怎么进入CMD 命令?

2.1)按住win+R键左下角会弹出运行对话框。

2.2)在对话框中,输入 cmd 命令。

Android模拟器使用技巧

1) 返回主菜单

当点击进某个应用后,按 ESC 键返回主菜单。

2)Genymotion 为什么不能安装在虚拟机中 ?

以下是官方回复:

Why doesn't Genymotion start from a virtual machine? Genymotion cannot be run from a virtual machine. Indeed, Genymotion needs a direct access to 
the hardware in order to provide OpenGL acceleration. Running Genymotion from a virtual machine prevents it to directly access the hardware components.
Therefore, Genymotion is incompatible when installed from VMWare, Parallels, Hyper-V or VirtualPC.

想想一天来折腾Genymotion安装在虚拟机的样子,只想说“Genymotion ,你过来我保证不打死你。”

3) 在Android 运行 simulator,报异常 Error while Running Android Application - Could not initialize OpenglES emulation, use '-gpu off' to disable it

异常信息如下:

C:\SDK\tools\emulator.exe -avd Nexus_5_API_21_x86 -netspeed full -netdelay none
emulator: ERROR: Could not initialize OpenglES emulation, use '-gpu off' to disable it.
could not get wglGetExtensionsStringARB
getGLES1ExtensionString: Could not find GLES .x config!
Failed to obtain GLES .x extensions string!
Could not initialize emulated framebuffer

解决问题:

Step1:

- Update your Operating system graphics driver.
- Restart your system.
- Set your system's screen resolution as high as possible.
- Try to start your AVD now.

Step2:

- If step 1 fails, Go to AVD Manager.
- Edit your AVD.
- Uncheck 'Use Host GPU' option.
- Click Finish (Save).
- Start AVD again.

参考资料:

http://www.cnblogs.com/Li-Cheng/articles/4369812.html

Mac下搭建Android环境参考如下资料

http://www.cnblogs.com/yjmyzz/p/4219829.html
http://tools.android-studio.org/
http://www.cnblogs.com/dava/p/3706162.html

  下载 Android SDK For Mac
  从以下地址下载 Android SDK For Mac ,并解压到本地目录:
a). http://down.tech.sina.com.cn/page/45703.html
b). http://mac.softpedia.com/get/Developer-Tools/Google-Android-SDK.shtml
c). http://ask.android-studio.org/?/article/9