今天在activity 里声明了一个builder,结果悲剧了,因为在builder直接new了一个,因为此时activity还没有建立起来,而builder建立的时候,需要context, Builder a = new Builder(this);故而,错了。。。
总结:
builder不能在oncreate前new,因为用到了上下文。
错误类型为Caused by: java.lang.IllegalStateException: System services not available to Activities before onCreate()