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.
Create MyPref interface, annotate with @SharedPref
Inject MyPref_ mypref field into the Activity with @Pref
Make sure not the generated class is in the manifest.
After that, AA will crash with NPE in the PrefHandler. This is because we do not generate the class, instead we print an error about wrong component name in the manifest. But the PrefHandler still runs, and thinks the generated class holder exists...
Stacktrace:
java.lang.NullPointerException
at org.androidannotations.handler.PrefHandler.process(PrefHandler.java:75)
at org.androidannotations.handler.PrefHandler.process(PrefHandler.java:36)
at org.androidannotations.process.ModelProcessor.processThrowing(ModelProcessor.java:145)
at org.androidannotations.process.ModelProcessor.process(ModelProcessor.java:129)
at org.androidannotations.AndroidAnnotationProcessor.processAnnotations(AndroidAnnotationProcessor.java:242)
at org.androidannotations.AndroidAnnotationProcessor.processThrowing(AndroidAnnotationProcessor.java:184)
at org.androidannotations.AndroidAnnotationProcessor.process(AndroidAnnotationProcessor.java:112)
Example project demonstrating the issue. The issue can be reproduced both from command line and Eclipse.