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就是帮我们实现这 ...
随机推荐
- delphi 一个关于xml文件导入数据库的问题
function LoadXml(shortPath:string;var xmlobj: IXMLDOMDocument):boolean; var tmpXml:IXMLDOMDOCUMENT; ...
- Vue.js 计算属性
Vue.js 计算属性 使用计算属性的实例: <!DOCTYPE html> <html> <head> <meta cahrset="utf-8& ...
- ValueError: invalid literal for int() with base 10问题处理
问题描述: 在用pthon写脚本得过程中,发生错误,ValueError: invalid literal for int() with base 10,这种错误是值得类型转换错误,int()函数是可 ...
- linux远程管理器 - xshell和xftp使用教程(zhuan)
准备好连接linux服务器的工具,推荐用xshell和xftp. xshell 是一个强大的安全终端模拟软件,它支持SSH1, SSH2, 以及Microsoft Windows 平台的TELNET ...
- 将windows下的文件上传到Linux服务器上
版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/lx_Frolf/article/deta ...
- 自动化测试常用断言的使用方法(python)-(转载@zhuquan0814
自动化测试中寻找元素并进行操作,如果在元素好找的情况下,相信大家都可以较熟练地编写用例脚本了,但光进行操作可能还不够,有时候也需要对预期结果进行判断. 这里介绍几个常用断言的使用方法,可以一定程度上帮 ...
- 深入研究浏览器对HTML解析过程
HTML HTML解析 HTML解析是一个将字节转化为字符,字符解析为标记,标记生成节点,节点构建树的过程. 标记化算法 是词法分析过程,将输入内容解析成多个标记.HTML标记包括起始标记.结束标记. ...
- Codeforces 497B Tennis Game( 枚举+ 二分)
B. Tennis Game time limit per test 2 seconds memory limit per test 256 megabytes input standard inpu ...
- Eclipse连接MySQL数据库(傻瓜篇)
我的环境:MySQL:mysql-essential-5.1.51-win32 jdbc驱动:我已经上传到csdn上一个:http://download.csdn.net/source/3451945 ...
- Django建表
最近在学习Django,遇到了些问题一起来看看吧. 1.自定义表名 Django 建表默认会以 app_name + Class_name 解决方法 #coding:utf8 from django. ...