简体   繁体   English

如何修复 XML 中阻止在 Android Studio 上显示预览或运行应用程序的错误(红色文本)?

[英]How can I fix errors (red texts) in XML which are preventing from showing preview or running the app on Android Studio?

My laptop is dead so I tried to open my project to my friend's laptop but i cant seem to see what i made, i tried to search one xml file...我的笔记本电脑坏了,所以我试图在我朋友的笔记本电脑上打开我的项目,但我似乎看不到我做了什么,我试图搜索一个 xml 文件......

在此处输入图片说明

But it showed some red statements .但它显示了一些红色的语句 I can't even see the design.我什至看不到设计。 Please help me .请帮帮我 :< :<

Basic steps to try:尝试的基本步骤:

  1. File -> Settings -> Version Control -> disable the VCS文件 -> 设置 -> 版本控制 -> 禁用 VCS

在此处输入图片说明

  1. File -> Sync with File System文件 -> 与文件系统同步

  2. File -> Sync Project with Gradle Files文件 -> 将项目与 Gradle 文件同步

  3. Build -> Clean Project构建 -> 清理项目

  4. Build -> Rebuild Project构建 -> 重建项目

  5. File -> Invalidate Cashes / Restart文件 -> 使现金无效/重新启动

Solving No facet found in module:解决在模块中找不到方面:

  1. Remove the .idea folder and any .iml files删除 .idea 文件夹和任何 .iml 文件
  2. Re-import the project into Android Studio.将项目重新导入 Android Studio。

I kinda tried to close the project and tried to import the project .我有点试图关闭该项目并尝试导入该项目 Now i can see the the files inside the app java module.现在我可以看到 app java 模块中的文件了。 Thank you guys :>>谢谢各位:>>

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

相关问题 如何从 Kotlin 中的 Android 应用程序发送文本和图像? - How can I tweet texts and images from an Android App in Kotlin? Android Studio-App Preview显示xml布局,但是当我在手机上运行App时,没有任何显示 - Android Studio - App Preview shows the xml layout but when I run the App on Phone nothing shows up 如何修复 colors.xml 文件中的错误? - How can I fix errors in my colors.xml file? 如何在运行应用程序时修复 android studio 版本 3.6.2 中的“无法解析结果路径字符串:”错误? - How can I fix the "Cannot parse result path string:" error in android studio version 3.6.2 on running the application? 如何修复 Android Studio 中的类重复错误 - how to Fix Class duplication errors in Android studio 如何在 Android Studio 中修复我的旧应用程序? - How do I fix my old app in Android Studio? 如何在 android 工作室的字符串中的文本之间添加空格 - How do I add space between texts in a string in android studio Android Studio:activity_main.xml和content_main.xml未显示设计预览&amp;&amp; ClassNotFoundException - Android Studio: activity_main.xml and content_main.xml not showing design preview && ClassNotFoundException 如何检查应用程序是否在 Android 上运行? - How can I check if an app running on Android? 如何解决 Android Studio 中原始文件夹的问题? - How can i fix my problem with raw folder in Android Studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM