0

When I commit to git and get error. But I did not stop at there error and I continue commit and push to gitlab. Then when I open my layout file, I found the weird symbols and wrong code in my layout file. Error I get from android studio is "Unexpected Tokens".

I try the solution below but did not works: Android Studio suddenly cannot resolve symbols

Sample image below:

Error Image 1: enter image description here

Error Image 2: enter image description here

Please help guys. Thank you.

punchman
  • 1,350
  • 1
  • 13
  • 23
Jacky Teaw
  • 93
  • 1
  • 9
  • Similar problem is here. But did not solve. https://stackoverflow.com/questions/53526435/unexpected-token-android-studio – Jacky Teaw Jan 29 '19 at 07:45
  • Your first image showing that your file is corrupted. Check and update it first. – ישו אוהב אותך Jan 29 '19 at 08:11
  • is it corrupt when try commit git with error? how to update it? – Jacky Teaw Jan 29 '19 at 08:19
  • No, it's not got corrupted because of the commit. I guess you're using Windows 10, because I previously have the same problem problem because of Windows trying to fixing the disk after reboot or crash. Have you make a previous commit before? You can rollback to previous commit if you have. – ישו אוהב אותך Jan 29 '19 at 08:59
  • Ya, u r correct. I m using window 10. I did the last commit yesterday. I not sure what I do, but now back to normal already. I made a copy of backup file, then I remove the local and remote branch, but did not work. Then I remove the file, and copy back from backup file, remove .idea and .iml file, import the file again. Then back to normal. – Jacky Teaw Jan 29 '19 at 09:37
  • Great! glad to hear that ;) – ישו אוהב אותך Jan 29 '19 at 10:03
  • Thanks of your comment. – Jacky Teaw Jan 29 '19 at 10:28

0 Answers0