Android studio 开发环境搭建

  一、环境:

  下载java jdk:http://www.oracle.com/technetwork/cn/java/javase/downloads/jdk8-downloads-2133151-zhs.html

下载Android Studio:http://developer.android.com/sdk/index.html

  二、安装步骤

    1、安装java jdk

        按照提示一步步来就行 ,如果需要配置环境变量参考 http://www.cnblogs.com/lmh2072005/p/5083648.html

    2、安装Android Studio和创建项目

    双击安装文件一步步安装即可。

  3、创建运行第一个Android apk hello world

  三、常见问题

  1、在运行app时提示未安装Intel HAXM错误信息:

    Emulator: ERROR: x86 emulation currently requires hardware acceleration!

     Please ensure Intel HAXM is properly installed and usable.

     CPU acceleration status: HAX kernel module is not installed!

解决方案:

    1) Open SDK Manager (In Android Studio, go to Tools > Android > SDK Manager) and Download Intel x86 Emulator Accelerator (HAXM installer) if you haven't.

    2) Now go to your SDK directory (C:\users\username\AppData\Local\Android\sdk, generally). In this directory Go to extras > intel > Hardware_Accelerated_Execution_Manager and run the file named "intelhaxm-android.exe".

In case you get an error like "Intel virtualization technology (vt,vt-x) is not enabled". Go to your BIOS settings and enable Hardware Virtualization.  //需要重启电脑设置bios

    3) Restart Android Studio and then try to start the AVD again.

      It might take a minute or 2 to show the emulator window.

  2、模拟器RAM过大,电脑内存不足,错误信息:

emulator: The memory needed by this VM exceeds the driver limit.

HAX is not working and emulator runs in emulation mode

在android studio 打开tools->android->avd manager  找到对应的avd 编辑, 在弹出的配置文件点击'Show Advanced Setting' ,

在详细设置里面把滚动条拉下来(滚动条很不明显,是个坑),根据自己电脑内存分配下内存

配置好后重启android studio

Run 'app' 一切ok

最后导出apk文件,在android studio -> build->Generate Signed APK 即可。

参考文档:

http://stackoverflow.com/questions/29136173/emulator-error-x86-emulation-currently-requires-hardware-acceleration

http://stackoverflow.com/questions/21031903/how-to-fix-hax-is-not-working-and-emulator-runs-in-emulation-mode

http://www.cnblogs.com/rwxwsblog/p/4769785.html

Android studio 开发环境搭建的更多相关文章

  1. 【Android Studio安装部署系列】二、Android Studio开发环境搭建

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 概述 Android Studio开发环境安装步骤 下载Android Studio 下载地址: http://www.wanandroi ...

  2. windows平台下Android studio开发环境搭建教程

    最近,Google 已宣布,为了简化 Android 的开发力度,以重点建设 Android Studio 工具,到今年年底将停止支持Eclipse等其他集成开发环境 .而随着Android stud ...

  3. Android开发学习之路--MAC下Android Studio开发环境搭建

    自从毕业开始到现在还没有系统地学习android应用的开发,之前一直都是做些底层的驱动,以及linux上的c开发.虽然写过几个简单的app,也对android4.0.3的源代码做过部分的分析,也算入门 ...

  4. 【Android学习笔记】Mac下Android Studio开发环境搭建

    本文由@ray 出品,转载请注明出处.  文章链接:http://www.cnblogs.com/wolfray/p/7829069.html 对于移动端这块,笔者之前一直都是进行iOS开发的,也从来 ...

  5. ubuntu 16.04 android studio 开发环境搭建

    安装步骤: 1. 安装 Java developer kit 2.安装 Android developer kit 3.安装 Android studio 4.真机调试 第一次用Linux,命令基本不 ...

  6. Android Studio开发环境搭建和HelloWorld

    跟着教程做的,已经有了JDK,直接进行后面的步骤,下载安装Android SDK 没有FQ,教程里的网址打不开,就换了个.网址 http://tools.android-studio.org/inde ...

  7. android studio 开发环境配置

    android studio 开发环境配置 参考: 第一次使用Android Studio时你应该知道的一切配置 https://www.cnblogs.com/qianguyihao/p/43909 ...

  8. android NDK开发环境搭建

    android NDK开发环境搭建 2012-05-14 00:13:58 分类: 嵌入式 基于 Android NDK 的学习之旅-----环境搭建 工欲善其事必先利其器 , 下面介绍下 Eclip ...

  9. Android Studio开发环境配置以及相关说明

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 前言 这里简单记录下在开发的时候使用的Android Studio开发环境版本以及相关注意事项. 一般来讲,每隔一段时间就要检查下Andr ...

随机推荐

  1. Instruments 使用指南

    Instruments 用户指南 http://cdn.cocimg.com/bbs/attachment/Fid_6/6_24457_90eabb4ed5b3863.pdf 原著:Apple Inc ...

  2. C语言学习笔记--类型定义&联合

    一.类型定义 C语言自定义数据类型 (typedef) C语言提供一个叫做typedef的功能来声明一个已有的数据类型的新名字. typedef int Length; 使得Length成为int类型 ...

  3. Win7主题被禁用

    今天早上干了一件傻缺的事,打开电脑的时候,某卫士提醒开机速度击败全国0.2%的电脑,之后点了优化...随后就发生了接下来的一幕: win7下面的主题都不能使用了,只能使用那种复古(很丑的样式,看着很不 ...

  4. VS2013程序打包部署(图解),vs2013部署

    VS2013程序打包部署(图解),vs2013部署 首先要说明的是VS解决方案配置下的Debug模式和Release模式有什么区别.Debug模式通常称为调试模式,它包含调试信息,未对代码进行优化,方 ...

  5. JavaScript Structure

    Element, Data, Event, Logic Data:----------- 1. method 1 var obj = { name : "thinkpad", ag ...

  6. Seek the Name, Seek the Fame

    poj2752:http://poj.org/problem?id=2752 题意:给你一个串,让你求前n个字符和后n个字符相同的n有多少,从小到大输出来. 题解:这一题要深刻理解KMP的next数组 ...

  7. WebSocket 支持的浏览器

    http://caniuse.com/#feat=websockets

  8. elk 发送zabbix告警

  9. BZOJ 1013 [JSOI2008]球形空间产生器sphere

    1013: [JSOI2008]球形空间产生器sphere Time Limit: 1 Sec  Memory Limit: 162 MBSubmit: 3074  Solved: 1614[Subm ...

  10. SherlockActivity也可以用依赖注入的方法:

    场景:     一个Activity必须继承RoboActivity才可以使用依赖注入. 若一个Activity已经继承了别的Activity了.比如SherlockActivity 如何才能使用依赖 ...