You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
I have a FragmentActivity which has some Fragments that I have annotated with @FragmentById. It randomly skips processing the @FragmentById annotation. I have checked the generated MyActivity_.java file and it doesn't set the fragment annotated with @FragmentById. The annotations are processed correctly if I later touch the original activity file.
I am using Eclipse Juno
So if I understand correctly, sometimes @FragmentById is taken into account, and sometimes it isn't. When you do a "project > clean", is it generated or not ? If you "touch the original activity file" and then it gets generated, what gets it to stop being generated ?
By the way, which version of AndroidAnnotations are you using ?
Hi @pyricau, thanks for your reply.
It isn't generated again after a project->clean. I noticed that it gets removed mostly when I create a new activity or add some more files to the project. I am using android-annotations 2.7.
Could you confirm that you get no compile time error at all in the whole project? By looking at the code, the only case where @FragmentById may not generate anything without issuing any warning is if the class has an @EXXX annotation that isn't part of the validated elements. But that would mean you'd have a compilation error on the @EXXX annotation.
I can confirm that there is no compile time warning in the whole project. I noticed that this happens every time I start Eclipse. I then have to touch all the files that have @FragmentById and then it works fine until I clean the project or restart Eclipse.
I noticed the same with the @PREF annotation. After a project->clean the required code would not be generated, when I do any change on the class, it will be regenerated correctly. Also, it seems the methods are generated in a different order in refresh and clean case.
This is in Eclipse Helios btw.
I opened #450 because I am not sure if this is the same problem here.
I am having the same issue with @FragmentByTag. I tried using both the annotated class and the generated class. ie... removing or adding the trailing '_'. Neither works and I get the following error in eclipse
Unexpected error. Please report an issue on AndroidAnnotations, with the following content: java.lang.NullPointerException
at com.googlecode.androidannotations.processing.FragmentByTagProcessor.process(FragmentByTagProcessor.java:68)
at com.googlecode.androidannotations.processing.ModelProcessor.process(ModelProcessor.java:102)
at com.googlecode.androidannotations.AndroidAnnotationProcessor.processAnnotations(AndroidAnnotationProcessor.java:505)
at com.googlecode.androidannotations.AndroidAnnotationProcessor.processThrowing(AndroidAnnotationProcessor.java:367)
at com.googlecode.androidannotations.AndroidAnnotationProcessor.process(AndroidAnnotationProcessor.java:341)
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139)
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:110)
at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159)
I am using
AndroidAnnotations 2.7.1
Eclipse 3.8.1
on Ubuntu
Activity
pyricau commentedon Dec 22, 2012
Hi @sapandiwakar
So if I understand correctly, sometimes
@FragmentByIdis taken into account, and sometimes it isn't. When you do a "project > clean", is it generated or not ? If you "touch the original activity file" and then it gets generated, what gets it to stop being generated ?By the way, which version of AndroidAnnotations are you using ?
sapandiwakar commentedon Dec 22, 2012
Hi @pyricau, thanks for your reply.
It isn't generated again after a
project->clean. I noticed that it gets removed mostly when I create a new activity or add some more files to the project. I am using android-annotations 2.7.pyricau commentedon Dec 27, 2012
Could you confirm that you get no compile time error at all in the whole project? By looking at the code, the only case where
@FragmentByIdmay not generate anything without issuing any warning is if the class has an@EXXXannotation that isn't part of the validated elements. But that would mean you'd have a compilation error on the@EXXXannotation.sapandiwakar commentedon Dec 31, 2012
I can confirm that there is no compile time warning in the whole project. I noticed that this happens every time I start Eclipse. I then have to touch all the files that have
@FragmentByIdand then it works fine until I clean the project or restart Eclipse.KoljaTM commentedon Jan 4, 2013
I noticed the same with the @PREF annotation. After a project->clean the required code would not be generated, when I do any change on the class, it will be regenerated correctly. Also, it seems the methods are generated in a different order in refresh and clean case.
This is in Eclipse Helios btw.
I opened #450 because I am not sure if this is the same problem here.
KenVanHoeylandt commentedon Mar 20, 2013
I had a similar problem and fixed it by changing this:
Into this:
(note the underscore difference)
It took me a long time to figure out as a @PREF annotation /does/ require the generated type to be used and Eclipse gave me no error message.
[edit] I had a similar problem with a custom view linked as SongTextView_ rather than SongTextView.
I am using version 2.7.1
Bitphreak commentedon May 8, 2013
I am having the same issue with @FragmentByTag. I tried using both the annotated class and the generated class. ie... removing or adding the trailing '_'. Neither works and I get the following error in eclipse
Unexpected error. Please report an issue on AndroidAnnotations, with the following content: java.lang.NullPointerException
at com.googlecode.androidannotations.processing.FragmentByTagProcessor.process(FragmentByTagProcessor.java:68)
at com.googlecode.androidannotations.processing.ModelProcessor.process(ModelProcessor.java:102)
at com.googlecode.androidannotations.AndroidAnnotationProcessor.processAnnotations(AndroidAnnotationProcessor.java:505)
at com.googlecode.androidannotations.AndroidAnnotationProcessor.processThrowing(AndroidAnnotationProcessor.java:367)
at com.googlecode.androidannotations.AndroidAnnotationProcessor.process(AndroidAnnotationProcessor.java:341)
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.handleProcessor(RoundDispatcher.java:139)
at org.eclipse.jdt.internal.compiler.apt.dispatch.RoundDispatcher.round(RoundDispatcher.java:110)
at org.eclipse.jdt.internal.compiler.apt.dispatch.BaseAnnotationProcessorManager.processAnnotations(BaseAnnotationProcessorManager.java:159)
I am using
AndroidAnnotations 2.7.1
Eclipse 3.8.1
on Ubuntu