设为首页 收藏本站
查看: 1084|回复: 0

win7搭建android开发环境

[复制链接]

尚未签到

发表于 2015-5-18 12:38:19 | 显示全部楼层 |阅读模式
  (1) java JDK下载:
    进入该网页: http://java.sun.com/javase/downloads/index.jsp (
  选择 Download JDK 只下载JDK,无需下载jre.
  (2)eclipse下载
     进入该网页: http://www.eclipse.org/downloads/ (或者直接点击下载:BT下载    HTTP下载) 。
  (3)下载Android SDK
      我们下载windowss平台下的sdk。http://developer.android.com/sdk/index.html
  (4)sdk安装
       我们第3步下载的sdk只是启动程序软件包,从android2.0器,android sdk被分为2部分,sdk启动程序软件包和sdk组件。手肘使用web浏览器获得启动程序软件包。下载后安装到合适目录。  安装到最后时,会运行sdk manager.exe.该程序会显示可用组件列表。也就是android sdk组件。包括文档,平台,附加软件库和usb驱动程序等等,选择自己想要安装的,然后点击install。
       
  些文件列表
  add-ons:一些扩展库,例如 Google APIs Add-On
  docs:API文档等等
  platforms:各个版本的平台组件
  samples:一些实例程序
  tools:各种辅助工具
  usb_driver:windows下的一些usb驱动
  temp:存放下载平台组件过程中的临时文件
    如果遇到消息“Failed to fetch URL…”的错误提示,那么需要将HTTPS方式改为HTTP方式,在“Android SDK and AVD Manager”窗口的左侧选择“Settings”,选中“Force https://...”选项,点击“Save & Apply”,并重新运行SDK Setup.exe。
     下载开发包的速度真是慢啊!搞了2个多小时。可以手动下载,不过比较麻烦,可以 参考:http://www.iyunv.com/ronli/archive/2012/04/20/2458687.html
  注意:官方tip: For easy access to the SDK tools from a command line, add the location of the SDK's tools/ and platform-tools to your PATH environment variable.
    不要忘了将tools和platform-tools加到path中去。(为了方便命令行使用)
   下载组件包时出现了一个错误:
  Downloading ARM EABI v7a System Image, Android API 16, revision 1
Download finished with wrong size. Expected 112321946 bytes, got 0 bytes.
  就是ARM EABI 下载失败了。
  说明:一般会在创建avd的时候容易出现Unable to find a ‘userdata.img’ file for ABI .svn to copy into the AVDfolder
原因是你在SDK Manager中更新Android该创建版本的SDK时 ,没有同时下载该版本的的ARM EABI v7a System Image package。以前2.x版本没有该文件。从4.0开始,创建模拟器需要该文件。
  想重新下载可就是下不动,看来要手动下载安装了。
  可以参考:
  android SDK Platforms 提取下载http://darkhandz.com/android-sdk-platforms-catch/
  组件下载地址:http://www.hariadi.org/android/manual-download-of-android-sdk-components/
  
  (5)安装eclipse插件ADT
  为了让开发过程轻松,google还编写了一个称为adT(android development toolkist)的eclipse插件.步骤如下:
  1.启动eclipse.选[help]=>[install new software]... ,
  2.在出现的对话框中单击Available software sites链接
  3单击add按钮,输入android开发工具更新站点的位置

https://dl-ssl.google.com/android/eclipse/
  注意:如果地址有问题,试着将https改为http。
  我的始终连接不上,只有手动安装了。下载ADT安装包, 前三部跟上面的一样,只是add后,我们不输入网址,而是直接Local选项中输入Android Plugin(名字任意),在Archive中找到ADT的压缩包,点击OK,然后在下面勾选Name中的选项即可。
  4安装完成后,重启eclipse
  
  还要配置ADT 插件。
  选择window->preferencs ->android,然后输入sdk安装目录C:\Program Files\Android\android-sdk ,单击ok按钮。
  (6)创建模拟器AVD
  Windows--》Android SDK and AVD ManageràVirtual device--》New 填写新的avd字段。
DSC0000.png
  Name:可以随便写,如sdk
  target:Target是模拟器的可用平台;
  SD Card是记忆卡,也就是手机的内存卡


  Skin是模拟器显示的屏幕大小,具体参数为:
  WVGA:800*480


  QVGA:320*240
  VGA:640*480
  HVGA:480*320
  WQVGA400:240*400
  WQVGA432:240*432
  WVGA800:800*480
  WVGA854:854*480
   或者也可以选择Resolution,自由设置模拟器屏幕大小。Hardware(AVD所需要的特殊设备)中的值:Abstracted LCD density(分辨率)其值是由选择的Skin自动设置的等等。
  到这里基本上就完成android环境的搭建了。
  
  参考:
  http://developer.android.com/sdk/installing/index.html
  http://www.iyunv.com/ok-lanyan/archive/2011/10/14/2207339.html
  
  2014.9.14安装安卓开发环境:
  下载的是:Download the stand-alone Android SDK Tools for Windows
  If you already have an IDE you want to use for Android app development, setting up a new SDK requires that you download the SDK Tools, then select additional Android SDK packages to install (such as the Android platform and system image). If you'll be using an existing version of Eclipse, then you can add the ADT plugin to it.
  这个sdk文档是这么描述的:
  Welcome to the Android SDK!
  The Android SDK archive initially contains only the basic SDK tools. It does
not contain an Android platform or any third-party libraries. In fact, it
doesn't even have all the tools you need to develop an application.
  In order to start developing applications, you must install the Platform-tools
and at least one version of the Android platform, using the SDK Manager.
  Platform-tools contains build tools that are periodically updated to support new
features in the Android platform (which is why they are separate from basic
SDK tools), including adb, dexdump, and others.
  To install Platform-tools, Android platforms and other add-ons, you must
have an Internet connection, so if you plan to use the SDK while
offline, please make sure to download the necessary components while online.
  To start the SDK Manager, please execute the program "SDK Manager.exe".
  From the command-line you can also directly trigger an update by
executing:
  tools\android.bat update sdk --no-ui
  Tip: use --help to see the various command-line options.
  
For more information, please consult the Android web site at
  http://developer.android.com/sdk/
  
  SDK安装完成,启动Android SDK Manager。

2)安装Platform
  仅仅SDK Tools是不够的,我们至少还需要一个Android平台和最新的SDK 平台工具。
  启动Android SDK Manager,如下图,勾选Android SDK Platform-tools和Android SDK Build-tools,Android 4.2.2文件夹,Extras下的Android Support Library。
  (说明,我安装是4.4.2)
DSC0001.png
DSC0002.png
  以上 安装下载太慢了,使用离线安装:
  方法看:http://www.iyunv.com/zuike/p/3330939.html
  http://blog.iyunv.com/gyming/article/details/8168166
  
  更多:http://www.sd173.com/html/1631.html
  http://www.open-open.com/lib/view/open1386252535564.html
  最后下了个eclipse ADT-Bundle绑定工具。
  With a single download, the Eclipse ADT bundle includes everything you need to begin developing apps:


  • Eclipse + ADT plugin
  • Android S
  • DK Tools
  • Android Platform-tools
  • A version of the Android platform
  • A version of the Android system image for the emulator
  
  ADT-Bundle for Windows 是由Google Android官方提供的集成式IDE,已经包含了Eclipse,你无需再去下载Eclipse,并且里面已集成了插件,它解决了大部分新手通过eclipse来配置Android开发环境的复杂问题。
  启动Eclipse。
  然后从Windows->Android Virtual Device Manger打开AVD管理器。
  
  
  Android AVD出现"No system images installed for this target"
  原因在于一个组件“ARM EABI v7a System Image”没有安装,如图2所示。
DSC0003.jpg
  如果安装了"Inter x86 Atom System Image",则CPU/ABI列表选项更加丰富。
  AVD创建:http://www.crifan.com/create_avd_android_virtual_device/
  第一次创建工程:
  http://my.oschina.net/dbeenlee/blog/181872
  http://doomshadow.com/proxy/index.php?q=aHR0cDovL2RldmVsb3Blci5hbmRyb2lkLmNvbS9wcmV2aWV3L2luZGV4Lmh0bWw%3D

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-68069-1-1.html 上篇帖子: FFMPEG 0.11.1 WIN7 MINGW环境编译 下篇帖子: 转~win7编译perl
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表