admin 发表于 2016-4-11 22:55:39

Android Studio 2.0 稳定版

<p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">英文原文:<a href="http://android-developers.blogspot.com/2016/04/android-studio-2-0.html" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;">Android Studio 2.0<br style="box-sizing: border-box;"></a>作者:Jamal Eason, Android 产品经理<br style="box-sizing: border-box;">译者:Guokai Han (非完全翻译)</p><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;"><img class="alignright wp-image-7190 size-thumbnail" src="http://7xkc0v.com1.z0.glb.clouddn.com/wp-content/uploads/2016/01/logo_android_studio_512dp-150x150.png" alt="logo_android_studio_512dp" width="150" height="150" style="box-sizing: border-box; border: 0px; height: auto; max-width: 100%; float: right; margin-bottom: 40px; margin-left: 40px;">Android Studio 2.0 是 Android 平台上构建高质量、高效应用的最快方法,包括手机、平板、Android Auto、Android Wear 和 Android TV 在内。作为来自 Google 的官方 IDE,Android Studio 包括你构建应用时需要的所有东西,包括代码编辑器、代码分析工具、模拟器以及更多。新的 2.0 稳定版带来更快的构建速度和更快的模拟器,支持最新的 Android 和 Google Play Services 。</p><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">Android Studio 与 Android 平台一起协作,支持所有最新、最主要的 API。如果你正在开发 Android ,你应该使用 Android Studio 2.0 。今天你可以直接<a href="http://developer.android.com/sdk/?utm_campaign=android_launch_studio_040716&amp;utm_source=anddev&amp;utm_medium=blog" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;">下载</a>或者在稳定版渠道上更新。</p><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">Android Studio 2.0 包含如下可用于开发流程中的新特性:</p><ul style="box-sizing: border-box; margin-bottom: 24px; margin-left: 35px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;"><li style="box-sizing: border-box; margin-bottom: 4px; margin-left: 0px;"><strong style="box-sizing: border-box;">Instant Run</strong>&nbsp;– 面向所有喜欢快速构建的开发者。做一些修改,改然后看着它出现在正在运行的应用中。</li><li style="box-sizing: border-box; margin-bottom: 4px; margin-left: 0px;"><strong style="box-sizing: border-box;">Android 模拟器</strong>&nbsp;– 新的模拟器大约比之前的模拟器快 3 倍,同时由于 ADB 的增强,传输应用和数据到模拟器上的速度比到物理设备上快 10 倍。</li><li style="box-sizing: border-box; margin-bottom: 4px; margin-left: 0px;"><strong style="box-sizing: border-box;">Cloud Test Lab 集成</strong>&nbsp;– 一次编写到处运行。利用&nbsp;<a href="http://developer.android.com/training/testing/start/index.html?utm_campaign=android_launch_studio_040716&amp;utm_source=anddev&amp;utm_medium=blog#run-ctl" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;">Cloud Test Lab</a>&nbsp;云服务,可以快速、方便地在广泛的 Android 物理设备上运行测试。</li><li style="box-sizing: border-box; margin-bottom: 4px; margin-left: 0px;"><strong style="box-sizing: border-box;">App Indexing 代码生成和测试</strong>&nbsp;– App Indexing 帮助你的应用更好地在 Google 搜索中呈现,现在 Android Studio 可以为你添加自动生成的 URL 。</li><li style="box-sizing: border-box; margin-bottom: 4px; margin-left: 0px;"><strong style="box-sizing: border-box;">GPU 调试器预览版</strong>&nbsp;– 对于开发 OpenGL ES 游戏或应用的开发者,现在可以使用 GPU 调试器看到每一帧和 GL 的状态。</li><li style="box-sizing: border-box; margin-bottom: 4px; margin-left: 0px;"><strong style="box-sizing: border-box;">IntelliJ 15 更新</strong>&nbsp;– Android Studio 基于&nbsp;Intellij 平台构建,现已升级到最新版。</li></ul><h3 style="box-sizing: border-box; font-weight: 400; font-stretch: normal; font-size: 28px; line-height: 1.4; font-family: Tahoma, Geneva, sans-serif; margin-bottom: 24px; color: rgb(33, 33, 33); padding-top: 18px;">深入新特性</h3><h5 style="box-sizing: border-box; font-weight: 400; font-stretch: normal; font-size: 20px; line-height: 1.4; font-family: Tahoma, Geneva, sans-serif; margin-bottom: 24px; color: rgb(33, 33, 33);">Instant Run</h5><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">当今,移动平台以速度和敏捷为中心。但是构建移动应用有时却感到很笨重而缓慢。Android Studio 中的&nbsp;Instant Run 让你进入快速、流畅的开发过程,加速了编辑、构建、运行的周期。点击&nbsp;Instant Run 按钮时,它会分析你修改的内容然后决定如何以最快的方式部署新的代码。</p><div id="attachment_7892" class="wp-caption aligncenter" style="box-sizing: border-box; line-height: 0; margin-right: auto; margin-bottom: 30px; margin-left: auto; max-width: 100%; position: relative; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; width: 482px;"><a ref="magnificPopup" href="http://7xkc0v.com1.z0.glb.clouddn.com/wp-content/uploads/2016/04/studio2-1.png" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;"><img class="wp-image-7892 size-full" src="http://7xkc0v.com1.z0.glb.clouddn.com/wp-content/uploads/2016/04/studio2-1.png" alt="studio2-1" width="472" height="200" style="box-sizing: border-box; border-width: 0px; border-style: initial; height: auto; max-width: 100%;"></a><p class="wp-caption-text" style="box-sizing: border-box; margin-right: auto; margin-left: auto; font-size: 13px; line-height: 18px; text-align: center; padding: 5px 10px;">新的 Instant Run 按钮</p></div><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">只要可能就会注入代码的变化部分到正在运行的应用进程中,从而避免重新部署或重新安装 APK 。有些类型的变化需要重启 activity 或应用,但是编辑、构建、运行的周期通常还是比以前更快。Instant Run 可用于所有 API 14 (Ice Cream Sandwich) 及以上的 Android 设备或模拟器。</p><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;"><span style="box-sizing: border-box; line-height: 1.5;">更多信息见&nbsp;Instant Run&nbsp;</span><a href="http://developer.android.com/tools/building/building-studio.html?utm_campaign=android_launch_studio_040716&amp;utm_source=anddev&amp;utm_medium=blog#instant-run" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); line-height: 1.5; background-color: transparent;">文档</a><span style="box-sizing: border-box; line-height: 1.5;">&nbsp;。</span></p><h5 style="box-sizing: border-box; font-weight: 400; font-stretch: normal; font-size: 20px; line-height: 1.4; font-family: Tahoma, Geneva, sans-serif; margin-bottom: 24px; color: rgb(33, 33, 33); padding-top: 18px;">Android 模拟器</h5><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">新的 Android 模拟器在 CPU、RAM 和 I/O 方面比之前的模拟器速度提升高达 3 倍。ADB push 速度提升高达 10 倍!在多数情况下,在官方 Android 模拟器上开发比在真实设备上更快。</p><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">除了速度和性能的提升,Android 模拟器还有一个崭新的用户界面和传感器控制面板。</p><div id="attachment_7893" class="wp-caption aligncenter" style="box-sizing: border-box; line-height: 0; margin-right: auto; margin-bottom: 30px; margin-left: auto; max-width: 100%; position: relative; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; width: 1034px;"><a ref="magnificPopup" href="http://7xkc0v.com1.z0.glb.clouddn.com/wp-content/uploads/2016/04/studio2-2.png" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;"><img class="wp-image-7893 size-large" src="http://7xkc0v.com1.z0.glb.clouddn.com/wp-content/uploads/2016/04/studio2-2-1024x609.png" alt="studio2-2" width="1024" height="609" style="box-sizing: border-box; border-width: 0px; border-style: initial; height: auto; max-width: 100%;"></a><p class="wp-caption-text" style="box-sizing: border-box; margin-right: auto; margin-left: auto; font-size: 13px; line-height: 18px; text-align: center; padding: 5px 10px;">Android 模拟器界面:工具栏和扩展控制面板</p></div><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">更多信息见 Android 模拟器<a href="http://developer.android.com/tools/devices/emulator.html?utm_campaign=android_launch_studio_040716&amp;utm_source=anddev&amp;utm_medium=blog" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;">文档</a>。</p><h5 style="box-sizing: border-box; font-weight: 400; font-stretch: normal; font-size: 20px; line-height: 1.4; font-family: Tahoma, Geneva, sans-serif; margin-bottom: 24px; color: rgb(33, 33, 33); padding-top: 18px;">Cloud Test Lab</h5><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">Cloud Test Lab 是一个在云端的服务,可以让你在广泛的设备和设备配置上测试你的应用。一旦你在自己的模拟器或设备上完成了基本测试,你可以用&nbsp;Cloud Test Lab 在更大范围的物理设备组合上进行测试。</p><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">Android Studio 中新的界面允许你配置&nbsp;Cloud Test Lab 上运行的测试组合,并看到测试结果。更多信息见<a href="http://developer.android.com/training/testing/start/index.html?utm_campaign=android_launch_studio_040716&amp;utm_source=anddev&amp;utm_medium=blog#run-ctl" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;">这里</a>。</p><div id="attachment_7894" class="wp-caption aligncenter" style="box-sizing: border-box; line-height: 0; margin-right: auto; margin-bottom: 30px; margin-left: auto; max-width: 100%; position: relative; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; width: 1034px;"><a ref="magnificPopup" href="http://7xkc0v.com1.z0.glb.clouddn.com/wp-content/uploads/2016/04/studio2-3.png" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;"><img class="wp-image-7894 size-large" src="http://7xkc0v.com1.z0.glb.clouddn.com/wp-content/uploads/2016/04/studio2-3-1024x682.png" alt="studio2-3" width="1024" height="682" style="box-sizing: border-box; border-width: 0px; border-style: initial; height: auto; max-width: 100%;"></a><p class="wp-caption-text" style="box-sizing: border-box; margin-right: auto; margin-left: auto; font-size: 13px; line-height: 18px; text-align: center; padding: 5px 10px;">配置 Cloud Test Lab</p></div><h5 style="box-sizing: border-box; font-weight: 400; font-stretch: normal; font-size: 20px; line-height: 1.4; font-family: Tahoma, Geneva, sans-serif; margin-bottom: 24px; color: rgb(33, 33, 33); padding-top: 18px;">App Indexing</h5><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">App Indexing API 可以让你的应用更容易地在 Google 搜索中被发现。Android Studio 2.0 可以帮助你在应用代码中创建正确的 URL 结构并添加相应的属性到&nbsp;AndroidManifest.xml 文件中。添加之后,可以在下图这里进行测试和验证。</p><div id="attachment_7895" class="wp-caption aligncenter" style="box-sizing: border-box; line-height: 0; margin-right: auto; margin-bottom: 30px; margin-left: auto; max-width: 100%; position: relative; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; width: 1034px;"><a ref="magnificPopup" href="http://7xkc0v.com1.z0.glb.clouddn.com/wp-content/uploads/2016/04/studio2-4.png" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;"><img class="wp-image-7895 size-large" src="http://7xkc0v.com1.z0.glb.clouddn.com/wp-content/uploads/2016/04/studio2-4-1024x473.png" alt="studio2-4" width="1024" height="473" style="box-sizing: border-box; border-width: 0px; border-style: initial; height: auto; max-width: 100%;"></a><p class="wp-caption-text" style="box-sizing: border-box; margin-right: auto; margin-left: auto; font-size: 13px; line-height: 18px; text-align: center; padding: 5px 10px;">Google App Indexing Testing</p></div><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">更多 Android Studio 对 App Indexing 的支持见<a href="http://developer.android.com/tools/help/app-link-indexing.html?utm_campaign=android_launch_studio_040716&amp;utm_source=anddev&amp;utm_medium=blog" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;">这里</a>。</p><h5 style="box-sizing: border-box; font-weight: 400; font-stretch: normal; font-size: 20px; line-height: 1.4; font-family: Tahoma, Geneva, sans-serif; margin-bottom: 24px; color: rgb(33, 33, 33); padding-top: 18px;">GPU 调试器预览版</h5><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">如果你在开发 OpenGL ES 游戏或图形为主的应用,在 Android Studio 2.0 中有一个新的 GPU 调试器可用了。尽管 GPU 调试器还是预览版,但是你可以一帧一帧地识别和调试图形渲染问题。更多信息见<a href="http://tools.android.com/tech-docs/gpu-profiler" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;">这里</a>。</p><div id="attachment_7896" class="wp-caption aligncenter" style="box-sizing: border-box; line-height: 0; margin-right: auto; margin-bottom: 30px; margin-left: auto; max-width: 100%; position: relative; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; width: 1034px;"><a ref="magnificPopup" href="http://7xkc0v.com1.z0.glb.clouddn.com/wp-content/uploads/2016/04/studio2-5.png" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;"><img class="size-large wp-image-7896" src="http://7xkc0v.com1.z0.glb.clouddn.com/wp-content/uploads/2016/04/studio2-5-1024x655.png" alt="GPU Debugger Preview" width="1024" height="655" style="box-sizing: border-box; border-width: 0px; border-style: initial; height: auto; max-width: 100%;"></a><p class="wp-caption-text" style="box-sizing: border-box; margin-right: auto; margin-left: auto; font-size: 13px; line-height: 18px; text-align: center; padding: 5px 10px;">GPU Debugger Preview</p></div><h3 style="box-sizing: border-box; font-weight: 400; font-stretch: normal; font-size: 28px; line-height: 1.4; font-family: Tahoma, Geneva, sans-serif; margin-bottom: 24px; color: rgb(33, 33, 33); padding-top: 18px;">下一步</h3><h5 style="box-sizing: border-box; font-weight: 400; font-stretch: normal; font-size: 20px; line-height: 1.4; font-family: Tahoma, Geneva, sans-serif; margin-bottom: 24px; color: rgb(33, 33, 33);">更新</h5><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">你可以通过 Android Studio 的自动升级进行更新。或者在<a href="http://developer.android.com/sdk/?utm_campaign=android_launch_studio_040716&amp;utm_source=anddev&amp;utm_medium=blog" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;">这里</a>重新下载一份最新版。如果你在开发 Android N 开发者预览版,请额外参考<a href="http://developer.android.com/preview/setup-sdk.html?utm_campaign=android_launch_studio_040716&amp;utm_source=anddev&amp;utm_medium=blog#get-as13" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;">这里</a>的配置指令。</p><h5 style="box-sizing: border-box; font-weight: 400; font-stretch: normal; font-size: 20px; line-height: 1.4; font-family: Tahoma, Geneva, sans-serif; margin-bottom: 24px; color: rgb(33, 33, 33); padding-top: 18px;">配置 Instant Run 和 Android 模拟器</h5><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">在更新或下载完 Android Studio 2.0 之后,你应该升级你的项目来使用&nbsp; Instant Run ,并创建新的&nbsp;Android Virtual Device (AVD) 来使用新的 Android 模拟器,这样你就有了一个更快的 Android 开发体验。</p><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">使用&nbsp;Instant Run 很容易。对于每一个现存的项目,你会看到一个升级项目到新的 gradle 插件版本的提示<code style="box-sizing: border-box; font-family: Consolas, 'Lucida Console', monospace; font-size: 1em; display: inline-block; vertical-align: top; padding-right: 5px; padding-left: 5px; color: rgb(51, 51, 51); background-color: rgb(250, 246, 225);">(com.android.tools.build:gradle:2.0.0)</code>。</p><div id="attachment_7897" class="wp-caption aligncenter" style="box-sizing: border-box; line-height: 0; margin-right: auto; margin-bottom: 30px; margin-left: auto; max-width: 100%; position: relative; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; width: 1034px;"><a ref="magnificPopup" href="http://7xkc0v.com1.z0.glb.clouddn.com/wp-content/uploads/2016/04/studio2-6.png" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;"><img class="size-large wp-image-7897" src="http://7xkc0v.com1.z0.glb.clouddn.com/wp-content/uploads/2016/04/studio2-6-1024x556.png" alt="升级提示" width="1024" height="556" style="box-sizing: border-box; border-width: 0px; border-style: initial; height: auto; max-width: 100%;"></a><p class="wp-caption-text" style="box-sizing: border-box; margin-right: auto; margin-left: auto; font-size: 13px; line-height: 18px; text-align: center; padding: 5px 10px;">升级提示</p></div><p style="box-sizing: border-box; margin-bottom: 24px; color: rgb(63, 69, 68); font-family: Arial, Helvetica, sans-serif; line-height: 24px;">Android Studio 2.0 中所有新的项目都会默认使用&nbsp;&nbsp;Instant Run。 更多信息见<a href="http://developer.android.com/tools/building/building-studio.html?utm_campaign=android_launch_studio_040716&amp;utm_source=anddev&amp;utm_medium=blog#instant-run" style="box-sizing: border-box; outline: 0px; text-decoration: none; transition-property: background-color, box-shadow, border, color, opacity; transition-duration: 0.3s; color: rgb(0, 191, 165); background-color: transparent;">这里</a>。</p><p></p>
页: [1]
查看完整版本: Android Studio 2.0 稳定版