![android– 无法解析R [No admob],第1张 android– 无法解析R [No admob],第1张](/aiimages/android%E2%80%93+%E6%97%A0%E6%B3%95%E8%A7%A3%E6%9E%90R+%5BNo+admob%5D.png)
我搜索了其他答案,我试图找到一个解决方案,我知道这个问题已被提出.
突然间我的Android Studio找不到R类(R.raw.blabla).
找不到任何R文件
在其他课程中,它正在发挥作用.
我尝试了什么:
>清洁项目
>手动导入R.
>在Manifest / Gradle applicationID中检查正确的包名称
>从Gradle清洁(gradlew clean)
>重建(Gradle和工具窗口)
>使高速缓存无效并重新启动
>重启 *** 作系统
>删除.gradle目录
>使用AS重新同步Gradle文件
>运行代码分析并修复任何警告/错误
>浏览整个xml文件并搜索错误/拼写错误
>重新导入项目
>更新SDK工具/重新下载
>更新构建工具
>更新依赖关系
>删除.IDea文件夹
>制作项目,制作模块
>重新安装AndroID Studio
>下载最新的AndroID Studio(Canary 3.3 Canary 11 2018年9月15日)
>使用Gradle修复lint错误(gradlew lintFix)
>更新Gradle包装器
>禁用D8
>启用D8
>组装
> cleanBuildCache
>更新Kotlin版本
>将Kotlin版本从Dev(1.3-20M)恢复到(至1.2.70)
>部分删除每个依赖项并逐个添加它们
>删除所有子项目构建文件夹,清理并重新构建
>从targetSDK / CompileSDK / BuildTools 28恢复到27
只有2个xml文件仍然出错
– 其他修改的xml文件我的意思是默认值
<?xml version="1.0" enCoding="utf-8"?> <androID.support.constraint.ConstraintLayout xmlns:androID="http://schemas.androID.com/apk/res/androID"xmlns:app="http://schemas.androID.com/apk/res-auto"androID:layout_wIDth="wrap_content"androID:layout_height="wrap_content"xmlns:tools="http://schemas.androID.com/tools"androID:ID="@+ID/root_constraint_layout"><TextVIEw androID:ID="@+ID/month_textVIEw" androID:layout_wIDth="wrap_content" androID:layout_height="wrap_content" androID:layout_marginEnd="8dp" androID:layout_marginStart="8dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintHorizontal_bias="0.0" app:layout_constraintStart_toStartOf="parent" app:layout_constrainttop_totopOf="parent" tools:text="Aug" /><TextVIEw androID:ID="@+ID/dayNr_textVIEw" app:layout_constraintEnd_toEndOf="@+ID/month_textVIEw" app:layout_constraintStart_toStartOf="@+ID/month_textVIEw" app:layout_constrainttop_toBottomOf="@+ID/month_textVIEw" tools:text="05" /><TextVIEw androID:ID="@+ID/day_textVIEw" app:layout_constraintEnd_toEndOf="@+ID/dayNr_textVIEw" app:layout_constraintStart_toStartOf="@+ID/dayNr_textVIEw" app:layout_constrainttop_toBottomOf="@+ID/dayNr_textVIEw" tools:text="Sun" /> </androID.support.constraint.ConstraintLayout>解决方法:
实际上我找到了一个奇怪的解决方案:
我试图从Canary(3.11年9月5日,3.11)的稳定/ beta AndroID Studio(3.2)导入项目
在稳定/ beta通道上,R类正在构建,我可以导入它.
最后,由于好奇心,我重新加载了Canary版本的项目.一切正常.
但最终我决定继续保持稳定的通道,并等待RC发布.
以上是内存溢出为你收集整理的android – 无法解析R [No admob]全部内容,希望文章能够帮你解决android – 无法解析R [No admob]所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)