简体   繁体   English

将android studio更新为chipmunk后导航组件方向生成类中的构建时间错误

[英]Build time error in navigation component direction generated classes after updating android studio to chipmunk

I'm getting "Unresolved reference: R" build time error after updating android studio to chipmunk version in all "Direction" classes that are generated by navigation component.在导航组件生成的所有“方向”类中将 android studio 更新为花栗鼠版本后,我收到“未解决的参考:R”构建时间错误。 R class is not imported in that classes, though I can import it manually but classes will be regenerated without import in next build R 类未在该类中导入,尽管我可以手动导入它,但在下一次构建中将重新生成类而无需导入

android gradle plugin version = 7.2.0 android gradle 插件版本 = 7.2.0

gradle wrapper version = 7.3.3-all gradle 包装器版本 = 7.3.3-all

any solutions?任何解决方案?

Had this same issue, I was able to fix it by updating this dependency in my Module build.grade有同样的问题,我可以通过在我的 Module build.grade 中更新这个依赖来修复它

buildscript {    
dependencies {
        classpath("androidx.navigation:navigation-safe-args-gradle-plugin:2.5.0-rc01")
    }
}

I also made sure my Android Gradle Plugin Version and Gradle Version were both set to the latest versions.我还确保我的 Android Gradle 插件版本和 Gradle 版本都设置为最新版本。 (in the Project Structure->Project) (在项目结构->项目中)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM