0

I sync my gradle projects to a usb stick and then I snyc two computers with it. Both are used by myself only, I'm just switching machines regularly (home vs work in my case).

I often get cannot resolve symbol (mostly with all support v4 classes only) exceptions from the IDE (compling works though) after this that can't be repaired anymore...

Any ideas how to solve this? And especially how to avoid this?

What I do already

  1. I have defined a build directory outside of the projects to avoid conflicts there based on wrong intermediate files like following:

    allprojects {
        buildDir = "M:/tmp/${rootProject.name}/${project.name}"
    }
    

What I try if the problem occurs

  1. I make a Invalidate Caches - Invalidate and Restart in android studio => does nearly never help
  2. I delete the .idea folder from my project => helps sometimes, is not very convenient, as I need to import the project again and set up the sdk again afterwards... and it does not always help either
  3. after syncing my project I make a clean build
prom85
  • 16,896
  • 17
  • 122
  • 242

1 Answers1

0

It's not the most beautiful solution, but it's the best I found.

If I delete the .idea/libraries folder after syncing, this solves the issue.

prom85
  • 16,896
  • 17
  • 122
  • 242