最新消息:20210917 已从crifan.com换到crifan.org

【记录】根据Android Studio提示去升级Gradle和更新配置提高性能

Android crifan 465浏览 0评论
折腾:
【未解决】Mac中Android Studio下载gradle速度太慢
期间,看到Android Studio提示:
点击升级
To take advantage of the latest features, improvements, and security fixes, we strongly recommend that you update the Android Gradle plugin from the current version 2.2.3 to version 3.5.2 and Gradle to version 5.4.1. Release notes

Android plugin 3.2.0 and higher now support building the Android App Bundle—a new upload format that defers APK generation and signing to compatible app stores, such as Google Play. With app bundles, you no longer have to build, sign, and manage multiple APKs, and users get smaller, more optimized downloads. Learn more
点击Release Notes
和Learn More
去看看:
Android App Bundle 简介  |  Android 开发者  |  Android Developers
https://developer.android.com/guide/app-bundle?utm_source=android-studio
Android App Bundle 简介
Android App Bundle 是一种发布格式,其中包含您应用的所有经过编译的代码和资源,它会将 APK 生成及签名延后到 Google Play 来完成。
Google Play 会使用您的 app bundle 针对每种设备配置生成并提供经过优化的 APK,因此只会下载特定设备所需的代码和资源来运行您的应用。您不必再构建、签署和管理多个 APK 来优化对不同设备的支持,而用户也可以获得更小且更优化的下载文件包。
-》很像是:之前的Apple的 针对你手机的架构 生成对应版本二进制
-》减少打包体积
Android Gradle 插件版本说明  |  Android 开发者  |  Android Developers
Android Gradle 插件版本说明
Android Studio 构建系统以 Gradle 为基础,并且 Android Gradle 插件添加了几项专用于构建 Android 应用的功能。虽然 Android 插件通常会与 Android Studio 的更新步调保持一致,但插件(以及 Gradle 系统的其余部分)可独立于 Android Studio 运行并单独更新。
点击Update,触发重新下载新版本:
然后依赖也更新到新版本3.5.2了:
buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.2'
    }
}
另外:
Android Studio 重启了
重新后下载失败:
另外,正好回去继续更换源去加速:
【未解决】Mac中Android Studio下载gradle速度太慢

转载请注明:在路上 » 【记录】根据Android Studio提示去升级Gradle和更新配置提高性能

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
93 queries in 0.196 seconds, using 23.34MB memory