当前位置: 首页 > article >正文

Android2024.2.1升级错误

提示 Gradle 版本不兼容,升级后就报错了 。

1.gradle安装包镜像

//distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https://mirrors.cloud.tencent.com/gradle/gradle-8.5-bin.zip //镜像

2. Build报错:A failure occurred while executing com.android.build.gradle.internal.dexing.DexWorkAction

Gradle 8.5 Release Notes:Gradle8.5全面支持Java21

 distributionUrl=https://services.gradle.org/distributions/gradle-8.5-bin.zip
 classpath 'com.android.tools.build:gradle:8.3.0'


3.Namespace not specified. Specify a namespace in the module’s build file.

app/build.gradle

apply plugin: 'com.android.application'

android {
    namespace "com.hty.browser" //新增
    compileSdkVersion 26

    defaultConfig {
        applicationId "com.hty.browser"
        minSdkVersion 19
        targetSdkVersion 26
    }

}

4.Android Studio:case 错误: 需要常量表达式

https://blog.csdn.net/wchinaw/article/details/7325641
http://tools.android.com/tips/non-constant-fields
case 变量,不再支持,使用 if 代替。
快捷键:选中switch后,按alt+enter,选择replace为if..else


http://www.kler.cn/news/339165.html

相关文章:

  • HTTP协议:连接世界的语言 —— Python中的实践与探索
  • 《计算机原理与系统结构》学习系列——计算机的算数运算(上)
  • No.0 笔记 | 从小白到入门:我的渗透测试笔记
  • Linux下的IO模型
  • 蓝桥等级考试C++组18级真题-2023-06-18
  • 计算物理精解【9】-计算原理精解【6】
  • QT:信号与槽
  • Linux高效查日志命令介绍
  • 常见激活函数总结
  • 论文精读:基于渐进式转移的无监督域自适应舰船检测
  • 【保姆级教程】UMLS工具——MetaMap安装及使用
  • 【初阶数据结构】排序——选择排序
  • SpringBoot中,接口签名,通用方案,以确保接口的安全性
  • 【C++】map详解
  • 数据结构-排序1
  • Java之注解
  • 滚雪球学MySQL[6.3讲]:数据库复制与高可用性详解:从主从复制到高可用集群
  • 论文复现:Training on the Benchmark Is Not All You Need
  • 极客兔兔Gee-Cache Day5
  • MySQL 查询优化器