android - RoboGuice injection -
i using code in android app (roboguice library):
@singleton public class usersessionprovider { private user user; @inject private injector injector; public synchronized user createsession() { this.user = injector.getinstance(user.class); return this.user; } public synchronized user getuser() { return user; } public synchronized void destroysession() { this.user = null; } public synchronized boolean issessionalive() { return getuser() != null; } }
sometimes build gets bugged up, , application fails inject instance of injector in provider. when clean app , rebuild again works ok (for time). using gradle build chain , android studio. know how can stop happening?
Comments
Post a Comment