Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Annotation import giving error on clean

I have a weird situation here. My application is using annotation in android. I had to use few of the methods which requires annotated class directly. But when ever I am cleaning my project or starting my eclipse imports is giving me error.

 import com.black.devil.app.view.CustomDetailsItemView_ cannot be resolved

Have anybody faced this problem before or any clue how to resolve it. Currently, after cleaning my project or starting eclipse, I remove all my imports and then again re import help me resolve my error. But I need to do this every time I clean/ start eclipse. Any permanent solution for this. I don't what code to post so tell if I need to post any thing else.

thanks Black Devil.

like image 844
Android Avatar asked Sep 19 '13 04:09

Android


1 Answers

This is actually a well-known issue on Eclipse. We have a section in the wiki for this.

You can fix it by (here is an example for Pref but it should work for every generated clases :

  • Importing the whole package: import com.company.*;
  • Using a fully qualified name : @SharedPref com.company.MyPref_ myPref;
  • Having MyBean and MyPref_ in the same package.
like image 166
DayS Avatar answered Nov 01 '22 12:11

DayS