问答详情
源自:2-3 ChooseMessageActivity

选择节日并点击时,自动停止并退出

 FATAL EXCEPTION: main

                  Process: com.im_festivalsms, PID: 3202

                  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.im_festivalsms/com.im_festivalsms.ChooseMsgActivity}: java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView

                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325)

                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)

                      at android.app.ActivityThread.access$800(ActivityThread.java:151)

                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)

                      at android.os.Handler.dispatchMessage(Handler.java:102)

                      at android.os.Looper.loop(Looper.java:135)

                      at android.app.ActivityThread.main(ActivityThread.java:5254)

                      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:903)

                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

                   Caused by: java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView

                      at android.widget.AdapterView.addView(AdapterView.java:487)

                      at android.view.LayoutInflater.rInflate(LayoutInflater.java:810)

                      at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)

                      at android.view.LayoutInflater.inflate(LayoutInflater.java:504)

                      at android.view.LayoutInflater.inflate(LayoutInflater.java:414)

                      at android.view.LayoutInflater.inflate(LayoutInflater.java:365)

                      at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)

                      at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140)

                      at com.im_festivalsms.ChooseMsgActivity.onCreate(ChooseMsgActivity.java:33)

                      at android.app.Activity.performCreate(Activity.java:5990)

                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)

                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)

                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 

                      at android.app.ActivityThread.access$800(ActivityThread.java:151) 

                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) 

                      at android.os.Handler.dispatchMessage(Handler.java:102) 

                      at android.os.Looper.loop(Looper.java:135) 

                      at android.app.ActivityThread.main(ActivityThread.java:5254) 

                      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:903) 

                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698) 


提问者:YouthStruggle 2016-10-19 22:35

个回答