Android Studio 0.4.0 发布

打杂程序猿
 打杂程序猿
发布于 2013年12月19日
收藏 11

Android Studio 0.4.0 发布了,包含如下改进:

  • 支持新的 Android Gradle plugin, 0.7.0, which has improvements for render script, lint, BuildConfig, ProGuard, and additional features around source folders and flavors, along with many bug fixes. For more information, see the Build System documentation.
  • Note that Studio 0.4.0 requires the the new version of the Gradle plugin, so you have to migrate your projects to 0.7.0.  If you just update your IDE, after loading your old project the IDE will show this error balloon:
    At this point you can click on the "Search in build.gradle files" link, which will locate the gradle version definition:
    Change those to "0.7.0" (or 0.7.+ to pick up the latest dot release) :
    Now you need to sync the project model. (Yes, we're still working on detecting these changes more intelligently). Click on the "Sync Project with Gradle Files" toolbar button:
    If you're using the Gradle wrapper, you also need to switch it from Gradle 1.8 to Gradle 1.9. If you don't, the sync will show the following error balloon:

    Just click the error link to have Studio automatically convert the wrapper and you're all set.
  • Studio now supports Gradle Offline mode. This is useful if you find yourself without a network connection, and your dependencies are using the plus-syntax to pick up the latest available version. In that case, Gradle will once per day (by default) connect to the artifact repository to see if there is a more recent version. If that network connection fails, the build fails. If you don't have a network connection, this is problematic. You can now open the Compiler > Gradle options and enable Offline mode, which will tell Gradle to ignore update-to-date checks:

    Note that if you add a new dependency you'll still need to have a network connection to download the artifact. If you somehow forget that you are in offline mode, there is a balloon tip for that:
  • Initial Eclipse (ADT) project import. You can now directly import Eclipse projects (rather than having to export them to Gradle from Eclipse as in the past). This importer also makes structural changes to the import:
    • It migrates the project structure from the old ADT directory structure to the new Gradle-build system one
    • It removes inlined library projects that it recognizes (ActionBarSherlock, v7 GridLayout) and replaces the source code with a simple Gradle dependency to the corresponding library
    • Similarly it removes .jar files that it recognizes and replaces them with Gradle dependencies
    • It generates an import summary where it lists potential import issues (for example, if you were using library projects without manifest merging, there is potential manifest registration duplication now)
    • (The import does not yet fully support path variables and linked resources; this will be fixed in 0.4.1)
  • The Asset Studio wizard is now available (until this point it was only available as part of the New Project wizard for generating launcher icons). Right click on a drawable folder and invoke "New > Image Asset":
  • You can also create nine-patch images now by right clicking on .png images and invoking "Create Nine Patch...".
  • A large number of bug fixes, particularly around SDK handling and project import/upgrade, but also to the rendering sandbox, custom view rendering, template handling, etc.

发行说明:http://tools.android.com/recent/androidstudio040released

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处,尊重他人劳动共创开源社区。
转载请注明:文章转载自 OSCHINA 社区 [http://www.oschina.net]
本文标题:Android Studio 0.4.0 发布
加载中

最新评论(10

zhangzhikai
zhangzhikai

引用来自“mymbrooks”的评论

引用来自“kut”的评论

这东西现阶段还是坨翔。

已用于生产环境开发,没那么坏,编辑器很好用。

没那么坏.
Jensson
Jensson
我已经把build.gradle 下0.6.+改为0.7.0了,而且wrapper也下载下来了1。9的。也点击同步了。还是提示android Studio 0.4.0, Gradle 0.7.0, project refresh failed: com.android.builder.model.AndroidProject.getVariants()Ljava/util/Collection;
H
Harx
网速慢的话,试试如下方法(windows为例):
1.andorid studio》update。
2.更改build.gradle 下0.6.+为0.7.0
3.Sync Project with Gradle Files
4.自行下载Gradle-1.9-all.zip
5.复制到用户文件夹下的\.gradle\wrapper\dists\gradle-1.9-all\3jdgemv0iv8uqohg3kcp2o88r1\
6.打开Studio。完成。
ConquerAndroid
ConquerAndroid
你可以仔细看更新说明,升级后需要升级gradle的
捏造的信仰
捏造的信仰
升级了,无法运行工程,开发团队说正在修复
fengyqf
fengyqf
这是Google产品吗?竟然不飙版本号!
mymbrooks
mymbrooks

引用来自“kut”的评论

这东西现阶段还是坨翔。

已用于生产环境开发,没那么坏,编辑器很好用。
程云
程云

引用来自“巴哥”的评论

程序有问题时不要担心。如果所有东西都没问题,你就失业了。

这倒是!很多公司单靠维护早期项目都能养活自己!
loyal
loyal
还是idea12里的比较好用.
返回顶部
顶部