DroidSmall icon indicating copy to clipboard operation
DroidSmall copied to clipboard

mControl is null

Open carlzhao opened this issue 9 years ago • 1 comments

E/AndroidRuntime: FATAL EXCEPTION: main Process: com.sunfusheng.small.app.phone, PID: 21500 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sunfusheng.small.app.phone/com.sunfusheng.small.app.phone.ui.PhoneActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.sunfusheng.small.lib.framework.base.BaseControl.setModel(com.sunfusheng.small.lib.framework.proxy.ModelMap)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2303) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2363) at android.app.ActivityThread.access$800(ActivityThread.java:147) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5235) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:906) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:701) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.sunfusheng.small.lib.framework.base.BaseControl.setModel(com.sunfusheng.small.lib.framework.proxy.ModelMap)' on a null object reference at com.sunfusheng.small.lib.framework.proxy.helper.BaseHelper.generateControl(BaseHelper.java:101) at com.sunfusheng.small.lib.framework.proxy.helper.BaseHelper.controlInit(BaseHelper.java:80) at com.sunfusheng.small.lib.framework.proxy.helper.BaseHelper.onCreate(BaseHelper.java:45) at com.sunfusheng.small.lib.framework.proxy.helper.ActivityHelper.onCreate(ActivityHelper.java:18) at com.sunfusheng.small.lib.framework.base.BaseAsyncActivity.onCreate(BaseAsyncActivity.java:27) at com.sunfusheng.small.lib.framework.base.BaseActivity.onCreate(BaseActivity.java:26) at com.sunfusheng.small.app.phone.ui.PhoneActivity.onCreate(PhoneActivity.java:32) at android.app.Activity.performCreate(Activity.java:5941) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2256) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2363)  at android.app.ActivityThread.access$800(ActivityThread.java:147)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1283)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5235)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:906)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:701) 

carlzhao avatar Sep 01 '16 01:09 carlzhao

add this in app.phone project's AndroidManifest.xml will solve this problem

android:name=".MainApplication"

carlzhao avatar Sep 02 '16 01:09 carlzhao