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:
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:
- 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.