由于过去一年一直都在使用jetbrains的IDE(pycharm, webstorm), 已经习惯了它的风格了。目前有个任务需要修改java的服务端接口代码(tomcat )和修改android程序,不论怎么了,开发工具配置这工作都必须要做的。本人选用了IntelliJ IDEA & Android Studio(在IntelliJ框架下开发的)。先从IntelliJ IDEA 13 说起,然后再顺便说下Android Studio。我以任务的方式来展开IDE的通用配置方法。

 

任务#1: 对已有Java Web工程的代码进行修改调试

 

步骤如下:

 

1. 下载tomcat

     这个不多说了,直接找tomcat.apache.org或使用brew,命令如下:

     $ brew install tomcat

 

2. 配置Tomcat

     在[IntelliJ IDEA]菜单上找到[Preferences]打开

    

      

android studio和idea androidstudio和idea的交互_Android Studio

选择[Application Servers]

     

 

android studio和idea androidstudio和idea的交互_macos_02

增加新服务器

          

 

3. 导入已有工程

     

android studio和idea androidstudio和idea的交互_tomcat_03

导入对话框

 

 

4. 导入库文件

     对于有些库是不能够自动加载的需要手动。

     操作如下:

android studio和idea androidstudio和idea的交互_IntelliJ IDEA_04

在工程上点击右键,弹出菜单

 

android studio和idea androidstudio和idea的交互_Android Studio_05

选择Libraries

 

 

android studio和idea androidstudio和idea的交互_Android Studio_06

导入指定目录的jar

 

 

5.配置Facts & Artifacts

android studio和idea androidstudio和idea的交互_tomcat_07

配置Facets

 

android studio和idea androidstudio和idea的交互_macos_08

添加Artifacts

 

6. 调试运行

     在调试运行前,需要配置Debug/Run环境

android studio和idea androidstudio和idea的交互_android studio和idea_09

在[Run]上选择[Edit Configurations]


android studio和idea androidstudio和idea的交互_Android Studio_10

添加本地服务器或远程服务器,就可以了


android studio和idea androidstudio和idea的交互_IntelliJ IDEA_11

点击[Debug]就可以调试了

 

 

任务#2: 对已有ADT工程的代码进行修改调试

 

     下载 android studio,直接去www.android.com就可以了。其他的步骤基本上和IntelliJ IDEA 相同,只是在配置的使用选择[Android Application],见下图,然后就OK了

android studio和idea androidstudio和idea的交互_Android Studio_12