入门的IntelliJ IDEA和Android开发入门
来源:互联网 发布:java微信公众开源框架 编辑:程序博客网 时间:2024/06/07 20:02
Getting Started with IntelliJ IDEA and Android Development
Download IntelliJ IDEA
If you don't already have IntelliJ IDEA installed, you can download a 30-day evaluation version from http://www.jetbrains.com/idea/download/
The plugin requires IntelliJ IDEA 7.0 or higher and is not compatible with earlier versions of IntelliJ IDEA.
Install Plugin
Go to Settings | Plugins, select the "Android Support" plugin in the Available tab and press Install.
Create New Project
Select "Create project from scratch" option. On the second page of the wizard, enter the name and location of your project.
Accept the default source root option. On the "Technologies" page, select Android and enter the path to your Android SDK installation.
If you are prompted to select a JDK, select the installation home of a Java 1.5 or 1.6 JDK (no JRE).
Create Activity
Select the src directory in the project view, press Alt-Ins (Ctrl-Enter on a Mac) to invoke the "New" menu and select "Package". Enter the name of the package.
Select the package, press Alt-Ins again and select "Activity" from the menu.
In the "New Activity" dialog, enter the class name and label for the activity. Ensure that "Mark as startup activity" checkbox is checked.
Create Activity Implementation
In the activity class, press Ctrl-O to invoke the "Override Methods" dialog. Select the onCreate method.
Type the method body text:
protected void onCreate(Bundle bundle) { super.onCreate(bundle); TextView tv = new TextView(this); tv.setText("Hello, Android, from IntelliJ IDEA!"); setContentView(tv); }
Run the Activity
Right-click the class and select "Run HelloWorld" from the context menu.
Wait for the emulator to start, and for the activity to be displayed.
If an error "Cannot start activity..." is printed in the console window, close the emulator and try again (this is a known issue with the Android emulator).
Note that the initial release of the plugin does not support debugging Android applications. Debugging support will be added in a future release.
Cool Stuff to Try
(a.k.a. why we're better than ADT :) )
In AndroidManifest.xml, put the cursor on @drawable/icon and press Ctrl-Shift-I.
Try pressing Ctrl-B and Ctrl-Space in a few places to explore the navigation completion options available. Even in the initial release of the plugin, a few things are supported.
- 入门的IntelliJ IDEA和Android开发入门
- Intellij IDEA插件开发入门
- Intellij IDEA插件开发入门
- intellij idea开发android从入门到精通(一)
- intellij idea开发android从入门到精通(二)
- intellij idea开发android从入门到精通(三)
- IntelliJ IDEA 开发入门与应用
- intellij idea开发android从入门到精通(八)————IntelliJ IDEA 相关核心文件和目录介绍
- IntelliJ IDEA入门参考手册
- Intellij IDEA使用入门
- IntelliJ IDEA 13 入门
- Intellij IDEA使用入门
- Intellij IDEA使用入门
- Intellij idea使用入门
- Intellij idea 入门
- IntelliJ IDEA单元测试入门
- IntelliJ-IDEA入门
- IntelliJ IDEA单元测试入门
- HttpHandler的认识与加深理解
- 秒杀多线程第一篇 多线程笔试面试题汇总
- samba配置参数详解
- C++实现分类统计字符串中字符个数
- Ajax+ashx vs Ajax+WebService
- 入门的IntelliJ IDEA和Android开发入门
- mysql修改数据库路径
- GridView和下拉菜单DropDownList结合
- 激发员工的工作动力第四篇 - 竞争篇
- classpath与path的理解
- standards of 4 pole headset OMTP/CTIA
- solr/lucene查询语法解析
- JS闭包之词法作用域
- html常用标签快速检索