android studio - IntelliJ IDEA shows deleted files and packages in code completion -


i have changed structure of packages of project. have created new packages, moved files new packages , deleted empty packages files had been.

now problem code completion shows of files twice, there new correct version , old version old package structure. let me give examples:

  1. i had class (file) "buttonbuilder" in package "component.builders.gui". moved "buttonbuilder" package "component.builders.gui.button". when type somewhere "buttonbuilder" code completion suggests 2 versions, first 1 "buttonbuilder (component.builders.gui)" , second "buttonbuilder component.builders.gui.button)", there no file / class named "buttonbuilder" in "component.builders.gui".

  2. the second example similar, when type "defaultphysiccomponent" code completion gives 2 options, "defaultphysiccomponent (component.components.physic)" , "defaultphysiccomponent (components.physiccomponents)". first 1 correct second not exist. class / file "defaultphysiccomponent" @ first in "components.physiccomponents", created new packages "component.components.physic", moved file there , deleted old packages. there not exist package "physiccomponents", code completion gives these 2 options.

there other files , packages same problem. somehow ide "thinks" old packages , files still exists. yields problem imports. when import example

import component.builders.gui.button.*;

and

import component.builders.gui.*;

the ide says reference "buttonbuilder" ambiguous, said above there exists 1 file / class "buttonbuilder".

does know how fix this?

under file > preferences > compiler check option: "clear output directory on rebuild" selected.

then rebuild project using build > rebuild project

if problem still occurring after invalidate caches, using file > invalidate caches / restart click on invalidate button.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -