Android打包cannot find symbol import androidx.annotation.NonNull

不知道从什么时候开始 implementation("androidx.annotation:annotation:1.1.0@jar")会导致打包失败,需要改成

implementation("androidx.annotation:annotation-jvm:1.7.0@jar")

这样就能解决Android打包类似下面的问题

  1. cannot find symbol import androidx.annotation.NonNull
  2. cannot find symbol @MainThread
  3. cannot find symbol @Nullable
相关推荐
一条上岸小咸鱼6 小时前
Kotlin 基本数据类型(一):Numbers
android·前端·kotlin
Huntto6 小时前
最小二乘法计算触摸事件速度
android·最小二乘法·触摸事件·速度估计
一笑的小酒馆6 小时前
Android中使用Compose实现各种样式Dialog
android
红橙Darren6 小时前
手写操作系统 - 编译链接与运行
android·ios·客户端
鹏多多.10 小时前
flutter-使用device_info_plus获取手机设备信息完整指南
android·前端·flutter·ios·数据分析·前端框架
来来走走15 小时前
Flutter开发 网络请求
android·flutter
独行soc21 小时前
2025年渗透测试面试题总结-18(题目+回答)
android·python·科技·面试·职场和发展·渗透测试
雨白1 天前
登录和授权:Cookie与Authorization Header机制详解
android
Frank_HarmonyOS1 天前
【Android -- 多线程】Handler 消息机制
android
一条上岸小咸鱼1 天前
Kotlin 基本数据类型(一):概述及分类
android·kotlin