All Activities and layouts got corrupted in Android Studio

前端 未结 6 1559
感情败类
感情败类 2021-02-02 10:03

I am working on a projects since 3 months. Today most of my activities and xml files got corrupted. I have tried deleting workspace.iml file but it remains same.Local History in

6条回答
  •  甜味超标
    2021-02-02 10:48

    I am also facing the same issue so i am copy the files from Project location which is corrupted. In my case, there is list of files corrupted due to module added in Login Activity

    1. build.gradle (Project)
    2. build.gradle (App-level)
    3. AndroidManifest.xml
    4. activity_login.xml
    5. ActivityLogin

    Steps to solve the problem

    1. I have deleting .iml and .idea file then restart the Android Studio.
    2. Paste the content from Project Location which is corrupted
    3. Commenting the code in which module classes available
    4. Run the application
    5. If you are using git then rollback the changes in corrupted files as copy-paste process as done in Step-2

    Above one process is working for me.

提交回复
热议问题