Android Studio 升级到 1.0后 有几个配置的字段改了。

Android Studio version 1.0.0 Released

 
Much waited Android studio V1 is out. Well,  if you are android dev, and do android as your day job, you should not be excited about this release much because , we know how quick is google when it comes to AS releases.

I am happy now the AS is out of BETA. Now I expect google to be responsible as not to ship buggy versions anymore. Thanks Google for taking AS out from Beta.

While this post is about AS 1 release, this is particularly about a FIX you need to do to your Gradle builds to get the new version up and running. If you use following properites in your build file, you might have a tough time figuring out why your builds are failing with this new shiny production ready AS.

OK, lets cut to the chase.

If you get one of these errors,


  1. Gradle DSL method not found: ‘runProguard()‘
  2. Gradle DSL method not found: ‘zipAlign()‘
  3. Gradle DSL method not found: ‘jniDebugBuild()‘
  4. Gradle DSL method not found: ‘renderscriptDebug()‘
 
You should change those property names to these new ones,
 
  1. BuildType.runProguard  ->  minifyEnabled
  2. BuildType.zipAlign  -> zipAlignEnabled
  3. BuildType.jniDebugBuild  -> jniDebuggable
  4. BuildType.renderscriptDebug  -> renderscriptDebuggable


Find more changes below,

http://tools.android.com/tech-docs/new-build-system

Lesson learned,

Don‘t update AS, without looking at release notes as new releases may not be backward compatible.

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。