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使用教程



Android Studio是一款由Google开发的集成开发环境(IDE),用于开发Android应用程序。它提供了丰富的功能和工具,使开发人员能够轻松地创建、调试和部署Android应用程序。 以下是Android Studio使用教程: 1. 下载和安装Android Studio:首先,您需要从官方网站(https://developer.android.com/studio)下载Android Studio的最新版本。然后,按照安装向导的指示进行安装。 2. 创建新项目:打开Android Studio后,您可以选择创建一个新项目或导入现有项目。选择“Create New Project”,然后按照向导的指示填写项目名称、包名和其他相关信息。 3. 设计用户界面:Android Studio提供了一个可视化的布局编辑器,使您能够直观地设计应用程序的用户界面。您可以拖放各种UI组件,设置属性和样式,以及预览应用程序的外观。 4. 编写代码:Android Studio内置了一个强大的代码编辑器,支持Java和Kotlin两种编程语言。您可以在代码编辑器中编写应用程序的逻辑和功能,并使用自动补全、调试工具和其他辅助功能提高开发效率。 5. 调试和测试:Android Studio提供了丰富的调试和测试工具,帮助您识别和修复应用程序中的错误和问题。您可以设置断点、监视变量、模拟设备和运行单元测试等。 6. 构建和部署:使用Gradle构建系统,Android Studio可以自动处理应用程序的依赖关系和构建过程。您可以配置构建类型、签名应用程序、生成APK文件,并将应用程序部署到模拟器或真实设备上进行测试。 7. 发布应用程序:一旦您完成了应用程序的开发和测试,您可以使用Android Studio生成一个发布版本的APK文件。然后,您可以将APK文件上传到Google Play商店或其他应用分发渠道,供用户下载和安装。 这是一个简要的Android Studio使用教程,希望对您有所帮助。如果您有任何进一步的问题,请随时提问。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值