Alberto Garrido
Alberto Garrido

Reputation: 555

Problems with android studio "Project View Tool Window" after moving project folder

I've been reorganizing my workspace by moving some project root folders, and now I can't work with the "Android View" in the toolbar window. As you can see on the screenshot the app "folder" is empty on "android view" but all the code is there (in different view) and the app is working.

I've been using Android Studio for no more than 2 weeks and can't fix this. I've searched on the mac console with grep command the old folder to see if in any config file was still present but with no luck.

Any one have an idea about what's happening?

Thanks :)

enter image description here

Upvotes: 1

Views: 1355

Answers (2)

Monte Creasor
Monte Creasor

Reputation: 513

There is an easier way to do this.

  1. Close your project
  2. Open it by using Android Studio's "Import Project" command
  3. You are good to go!

Upvotes: 2

James Skemp
James Skemp

Reputation: 8551

I'm on Windows, but a variant of these paths should work on Mac.

Close your project (you can keep Android Studio open at the launcher) and then try deleting (or moving or renaming) the following three files:

  • ProjectRoot\build\intermediates\model_data.bin
  • ProjectRoot\.gradle\2.2.1\taskArtifacts\fileSnapshots.bin
  • ProjectRoot\.gradle\2.2.1\taskArtifacts\taskArtifacts.bin

Re-open the project and run a build.

I ran into this exact problem myself (Android 1.0.2 on Windows) and this resolved the issue for me.

I tried building the project, rebuilding, and running a clean, all to no avail.

After searching around a bit for a piece of my old file structure I found these references sitting around.

The last two are automatically recreated, while the intermediates bin hasn't been regenerated yet. So probably just one or both of the last two are the problem.

Upvotes: 2

Related Questions