"Android Development Experience" low version of Popupwindow init method null pointer exception problem

Source: Internet
Author: User

Yesterday, the tester submitted to me a bug, in version 2.3, when the pop-up Popupwindow, there will be a null pointer exception, in the high version no problem, the following is the error message (Find the same exception, my exception has been resolved)

Exception information: exception:null stack information: Android.widget.PopupWindow.setContentView (popupwindow.java:384) Android.widget.popupwindow.<init> (popupwindow.java:286) android.widget.popupwindow.<init> ( popupwindow.java:266) android.widget.popupwindow.<init> (popupwindow.java:223) Net.oschina.gitapp.widget.dropdownmenu.<init> (dropdownmenu.java:34) Net.oschina.gitapp.ui.ProjectActivity.initMoreMenu (projectactivity.java:255) NET.OSCHINA.GITAPP.UI.PROJECTACTIVITY.ACCESS$10 (projectactivity.java:254) net.oschina.gitapp.ui.ProjectActivity $3.onpostexecute (projectactivity.java:385) Net.oschina.gitapp.ui.projectactivity$3.onpostexecute ( projectactivity.java:1) Android.os.AsyncTask.finish (asynctask.java:417) android.os.asynctask.access$300 ( asynctask.java:127) Android.os.asynctask$internalhandler.handlemessage (asynctask.java:429) Android.os.Handler.dispatchMessage (handler.java:99) android.os.Looper.loop (looper.java:130) Android.app.ActivityThread.main (activitythread.java:3691) java.lang.reflect.Method.invokeNatIve (Native Method) Java.lang.reflect.Method.invoke (method.java:507) com.android.internal.os.zygoteinit$ Methodandargscaller.run (zygoteinit.java:912) com.android.internal.os.ZygoteInit.main (zygoteinit.java:670) Dalvik.system.NativeStart.main (Native Method)

This is due to the absence of a super (context) call in the constructor method, only the super (context) can be called in the first row of the constructor method.

"Android Development Experience" low version of Popupwindow init method null pointer exception problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.