Migrating Your Android App from Eclipse to Android Studio
By: Jason
Snell | Posted in: Mobile, Performance
Tech Tips, Top
Post, Jun. 7th, 2013
One of the more exciting announcements from Google
IO this year was the Android Team’s decision to release Android
Studio. Android Studio isJetBrains’
IntelliJ IDEA with a brand new, extremely rich, Android-focused plugin. (It’s similar to Eclipse with the ADT
package.) If you’re feeling adventurous, give it a spin by migrating one of your Eclipse apps.
Getting Started
First, you’ll need to update your SDK installation to the latest version. (Versions 22.0.0 and up will migrate your app to Android Studio.) After a few SDK Manager updates and restarts, you should see something like this:

Now you’re ready to export your application from Eclipse. Google choseGradle as
the new Android build system, so we’ll generate the necessary build files first. From the Eclipse menu, choose ‘File’ and then click ‘Export’. Under the Android folder, you’ll find ‘Generate Gradle build files’:

Choose the project you want to migrate and click ‘Finish’. Next, exit Eclipse and fire up Android Studio. You’ll want to import an existing project. You can do it from the File menu or the wizard if you don’t have a project opened. Navigate to
the directory containing your app and double click the build.gradle file:

Now you’re almost there! Check ‘Use auto-import’ and select the Gradle wrapper. Or you can choose a Gradle distribution location if you have Gradle 1.6 installed. (This will skip the step of adding a few files to your project directory.) When you
click ‘Finish’, Android Studio will perform a few housekeeping tasks and open your shiny new Gradle project. Hurray!

Bonus Round
Now that you’re working happily in Android Studio, isn’t it time to add a little New Relic action to the mix? Don’t have a New Relic account? (Sign
up for one today and get a free 30-day trial!)
First, merge the following into your build.gradle file:
buildscript repositories mavenCentral() } dependencies classpath'com.newrelic.agent.android:agent-gradle-plugin:+' }}repositories mavenCentral()}apply'android'apply'newrelic'dependencies compile'com.newrelic.agent.android:android-agent:+'} |
Then add an import to your default Activity class:
import |
And in the onCreate() method, add this call to initialize New Relic:
NewRelic.withApplicationToken("<your).start(this.getApplication()); |
That’s it! We’d love to hear about your migration stories. Let us know your experiences in the comments below.
from:http://blog.newrelic.com/2013/06/07/migrating-your-android-app-from-eclipse-to-android-studio/
Migrating Your Android App from Eclipse to Android Studio的更多相关文章
- 第四篇:Eclipse Android app 工程迁移到 Android Studio
前言:这种问题当然在所难免,所幸android studio的project 工程目录远比 Eclipse 要了然. 目录对比 我们在Eclipse中创建一个EclipseDemo的Android项目 ...
- Android开发环境--eclipse和Android Studio
一.eclipse下载.安装.配置 因为eclipse是之前就下载过的,现在只能大概说一下eclipse的下载安装过程. 1.下载jdk,配置java环境变量 (1)在官网(http://www.o ...
- Android开发由eclipse转Android Studio中一些常见出错问题解决方法
1.给一个Activity添加了一个Dialog主题,结果出现了下面的问题,在eclipse却没有出错 <activity android:name=".DialogActivity& ...
- Android开发之Eclipse与Android Studio的java类 作者版权模板
/** * 作者:${USER} on ${DATE} ${HOUR}:${MINUTE} * * 联系QQ:986945193 * * 微博:http://weibo.com/mcxiaobing ...
- Eclipse与Android源码中ProGuard工具的使用
由于工作需要,这两天和同事在研究android下面的ProGuard工具的使用,通过查看android官网对该工具的介绍以及网络上其它相关资料,再加上自己的亲手实践,算是有了一个基本了解.下面将自己的 ...
- 用 Eclipse 开发 Android 应用程序
转自:http://www.apkbus.com/android-13828-1-1.html 开始之前 本教程介绍如何在 Eclipse 环境中进行 Android 应用程序开发,包括两个示例应用程 ...
- Eclipse与Android源码中ProGuard工具的使用(代码混淆)
由于工作需要,这两天和同事在研究android下面的ProGuard工具的使用,通过查看android官网对该工具的介绍以及网络上其它相关资料,再加上自己的亲手实践,算是有了一个基本了解.下面将自己的 ...
- 根坤 eclipse配置android开发环境并搭建第一个helloWord工程
一.搭建Android在eclipse下环境 一.JDK(不用安装 下载地址: http://www.xp510.com/xiazai/Application/program/23625.ht ...
- How To Use Proguard in Android APP
在Android开发完成即将发布给用户使用时,还有最后重要的一步:代码混淆,这时候,Proguard就派上用场了,大家谁也不想辛辛苦苦写的代码太容易被别人反编译过来,而Proguard就是帮我们实现这 ...
随机推荐
- python-zx笔记3-函数
一.调用函数 在交互式命令行通过help(abs)查看abs函数的帮助信息 把函数名赋给一个变量 a = abs 二.定义函数 求解方程:ax2 + bx + c = 0 # -*- coding: ...
- [CSP-S模拟测试]:marshland(最大费用可行流)
题目描述 前方有一片沼泽地.方便地,我们用一个$n\times n$的网格图来描述它,每一个格子代表着沼泽地的一小片区域.其中$(1,1)$代表网格图的左上角,$(n,n)$代表网格图的右下角.若用$ ...
- mac使用相关笔记
1.软件提示已损坏,需要移到废纸篓的解决方法 -> sudo spctl --master-disable xattr -r -d com.apple.quarantine <path&g ...
- iOS图片压缩问题
对于压缩的处理我给出的建议是 先判断 图片的大小,如果是本地图片最好用nsfilemanager 来判断 .如果不能用这个判断的话 就只能先将图片转成data,然后再判断了. 图片转成data 当然就 ...
- js不同类型作比较
引用自 http://www.zhufengpeixun.cn/jishuziliao/javaScriptzhuanti/2014-06-14/300.html 不同类型间的比较,规律如下 类型 类 ...
- Master Reactor Manager Worker TaskWorker(Task)
1.Master进程 master进程为主进程,该进程会创建Manager进程和Reactor线程等工作进/线程 swoole的主进程,是个多线程的程序. 主进程内的回调函数: onStart onS ...
- 关系型数据库MySQL(一)_增删改查
1.创建表单 create table product (product_id char(4) not null, product_name varchar(100) not null, sa ...
- VMware Workstation Pro 无法在Windows 上运行 检查可在Windows上运行的此应用的更新版
1.问题描述 2.排查原因 国庆节后微软推送了一个新的更新补丁,更新之后发现VMware无法打开(未更新前正常). 3.解决方案 3.1卸载微软更新补丁 Windows 10的安全更新难以被彻底规避, ...
- lvm 磁盘扩容
LVM磁盘管理 一.LVM简介 LVM是 Logical Volume Manager(逻辑卷管理)的简写,它由Heinz Mauelshagen在Linux 2.4内核上实现.LVM将一个或多个硬盘 ...
- 六、hibernate表与表之间的关系(多对多关系)
多对多关系 创建实体类和对应映射文件 Student.java package com.qf.entity; import java.util.HashSet; import java.util.Se ...
