Android studio使用教程

Android Studio 是一个全新的 Android 开发环境,基于 IntelliJ IDEA. 类似 Eclipse ADT,Android Studio 提供了集成的 Android 开发工具用于开发和调试,在 IDEA 的基础上.

首先我们需要下载android studio

android studio下载

很显然的IntelliJ IDEA的样貌,下面是一些截图:

android studio使用教程

选择了“New Project”

android studio使用教程

给工程和包起个名字

android studio使用教程

创建自定义图标

android studio使用教程

选择工程类型

android studio使用教程

给工程定个名字

android studio使用教程

开始创建。

向导基本上和Eclipse差不多。不过这个创建过程可比Eclipse上长的多。主要是因为从gradle上下载。

工程的结构和Eclipse上的不同,src下分为java和res

android studio使用教程

可以直接选择ADT中配置好的Emulators

android studio使用教程

运行还是在已有的Emulator上。

下面是导入的界面:

选择一个工程

android studio使用教程

然后是询问从哪里导入

android studio使用教程

然后是设定名字和路径

android studio使用教程

选择库

android studio使用教程

选择工程模块

android studio使用教程

选择库

java的

android studio使用教程

android的

android studio使用教程

但是有两个jar文件没找到——前瞻版里没有这个文件,只好找以前安装的包里的同名文件

android studio使用教程

询问AndroidManifest.xml文件

android studio使用教程

询问是否加入Git

android studio使用教程

工程结构,和Eclipse上的一样。

android studio使用教程

模拟器半天没起来,用Eclipse启动了模拟器,Android Studio的DDMS又找不到设备,

然后重新尝试,又起来了。DDMS的样子,和Eclipse上的一样。

android studio使用教程

发布仍然不成功:下面是控制台Log。

Waiting for device.
"/Applications/Android Studio.app/sdk/tools/emulator" -avd Nexus -netspeed full -netdelay none

WARNING: Data partition already in use. Changes will not persist!
WARNING: SD Card image already in use: /Users/stephenwang/.android/avd/Nexus.avd/sdcard.img
WARNING: Cache partition already in use. Changes will not persist!
emulator: emulator window was out of view and was recentered

Device connected: emulator-5556
Device is online: emulator-5556
Target device: emulator-5556 (Nexus)
Uploading file
local path: /development/workspace/KingOfAir/out/production/KingOfAir/KingOfAir.apk
remote path: /data/local/tmp/com.octrois.koa
Installing com.octrois.koa
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.octrois.koa"
Device is not ready. Waiting for 20 sec.
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.octrois.koa"
Device is not ready. Waiting for 20 sec.

终于起来了,就是一个字:慢!

android studio使用教程



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值