技术栈

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

怪兽20142024-03-10 19:07

不知道从什么时候开始 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
上一篇:trunk
下一篇:Jar Licenses check
相关推荐
柿蒂
1 天前
从if-else和switch,聊聊“八股“的作用
android·java·kotlin
Jerry
1 天前
Compose 5 个简短动画,让您的应用脱颖而出
android
PenguinLetsGo
1 天前
你的App是否有出现过幽灵调用?
android
没有了遇见
1 天前
Android ViewPager2 嵌套 RecyclerView 滑动冲突解决方案
android
咖啡の猫
1 天前
Android开发-选择按钮
android·gitee
火柴就是我
1 天前
android 以maven的方式 引入本地的aar
android
过-眼-云-烟
1 天前
新版Android Studio能打包但无法run ‘app‘,编译通过后手机中没有安装,顶部一直转圈
android·ide·android studio
hedalei
1 天前
android14 硬键盘ESC改BACK按键返回无效问题
android·android14·esc·back按键
hcgeng
1 天前
android 如何判定底部导航栏显示时 不是键盘显示
android·底部导航·导航高度
和煦的春风
1 天前
性能案例分析 | Waiting for GPU completion
android·linux
热门推荐
01GitHub 镜像站点02UV 工具安装与国内镜像源配置指南03UV安装并设置国内源04Claude Code 平替:OpenAI发布 Codex CLI ,GPT-5 国内直接使用0546个Nano-banana 精选提示词,持续更新中06A股预测还能更准?开源大模型Kronos带你跑通预测+回测全流程07conda中设置镜像地址(附所有可换的地址)08保姆级教程:手把手教你用Dify实现完美多轮对话(附Chatflow和提示词)09KGG转MP3工具|非KGM文件|解密音频10解决 WSL Ubuntu 中 /etc/resolv.conf 自动重置问题