Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing dialog causing crash #2

Open
alinabidnenko opened this issue Apr 24, 2015 · 0 comments
Open

Showing dialog causing crash #2

alinabidnenko opened this issue Apr 24, 2015 · 0 comments
Labels

Comments

@alinabidnenko
Copy link

Show dialog
AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(context);
alertDialogBuilder.setSingleChoiceItems(values, activePosition, null);
alertDialogBuilder.setPositiveButton(R.string.ok, onSetClickListener);
alertDialogBuilder.show();

causing crash
04-24 17:53:10.696 4105-4105/com.babylon E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.babylon, PID: 4105
android.view.InflateException: Binary XML file line #23: Error inflating class
at android.view.LayoutInflater.createView(LayoutInflater.java:620)
at com.madisp.pretty.LayoutFactoryWrapper.onCreateView(LayoutFactoryWrapper.java:42)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:3022)
at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3085)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:286)
at com.android.internal.app.AlertController.installContent(AlertController.java:240)
at android.app.AlertDialog.onCreate(AlertDialog.java:337)
at android.app.Dialog.dispatchOnCreate(Dialog.java:361)
at android.app.Dialog.show(Dialog.java:262)
at android.app.AlertDialog$Builder.show(AlertDialog.java:951)
at com.babylon.utils.AlertDialogHelper.showListSingleChoiceAlert(AlertDialogHelper.java:398)
at com.babylon.view.SmokerView.showSmokerDialog(SmokerView.java:84)
at com.babylon.view.SmokerView.access$000(SmokerView.java:16)
at com.babylon.view.SmokerView$1.onClick(SmokerView.java:106)
at android.view.View.performClick(View.java:4438)
at android.view.View$PerformClick.run(View.java:18422)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at android.view.LayoutInflater.createView(LayoutInflater.java:594)
            at com.madisp.pretty.LayoutFactoryWrapper.onCreateView(LayoutFactoryWrapper.java:42)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
            at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:3022)
            at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3085)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:286)
            at com.android.internal.app.AlertController.installContent(AlertController.java:240)
            at android.app.AlertDialog.onCreate(AlertDialog.java:337)
            at android.app.Dialog.dispatchOnCreate(Dialog.java:361)
            at android.app.Dialog.show(Dialog.java:262)
            at android.app.AlertDialog$Builder.show(AlertDialog.java:951)
            at com.babylon.utils.AlertDialogHelper.showListSingleChoiceAlert(AlertDialogHelper.java:398)
            at com.babylon.view.SmokerView.showSmokerDialog(SmokerView.java:84)
            at com.babylon.view.SmokerView.access$000(SmokerView.java:16)
            at com.babylon.view.SmokerView$1.onClick(SmokerView.java:106)
            at android.view.View.performClick(View.java:4438)
            at android.view.View$PerformClick.run(View.java:18422)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5017)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.view.ViewConfiguration.get(ViewConfiguration.java:325)
at android.view.View.(View.java:3448)
at android.view.View.(View.java:3505)
at android.view.ViewGroup.(ViewGroup.java:470)
at android.widget.FrameLayout.(FrameLayout.java:101)
at android.widget.FrameLayout.(FrameLayout.java:97)
            at java.lang.reflect.Constructor.constructNative(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
            at android.view.LayoutInflater.createView(LayoutInflater.java:594)
            at com.madisp.pretty.LayoutFactoryWrapper.onCreateView(LayoutFactoryWrapper.java:42)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
            at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:3022)
            at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3085)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:286)
            at com.android.internal.app.AlertController.installContent(AlertController.java:240)
            at android.app.AlertDialog.onCreate(AlertDialog.java:337)
            at android.app.Dialog.dispatchOnCreate(Dialog.java:361)
            at android.app.Dialog.show(Dialog.java:262)
            at android.app.AlertDialog$Builder.show(AlertDialog.java:951)
            at com.babylon.utils.AlertDialogHelper.showListSingleChoiceAlert(AlertDialogHelper.java:398)
            at com.babylon.view.SmokerView.showSmokerDialog(SmokerView.java:84)
            at com.babylon.view.SmokerView.access$000(SmokerView.java:16)
            at com.babylon.view.SmokerView$1.onClick(SmokerView.java:106)
            at android.view.View.performClick(View.java:4438)
            at android.view.View$PerformClick.run(View.java:18422)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5017)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
            at dalvik.system.NativeStart.main(Native Method)

show Fragment dialog
final OkDialogFragment okDialogFragment = OkDialogFragment.getInstance(resultMessage);
okDialogFragment.show(getFragmentManager(), OkDialogFragment.TAG);

4-24 18:00:15.108 7605-7605/com.babylon E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.babylon, PID: 7605
android.view.InflateException: Binary XML file line #23: Error inflating class
at android.view.LayoutInflater.createView(LayoutInflater.java:620)
at com.madisp.pretty.LayoutFactoryWrapper.onCreateView(LayoutFactoryWrapper.java:42)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:3022)
at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3085)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:286)
at com.android.internal.app.AlertController.installContent(AlertController.java:240)
at android.app.AlertDialog.onCreate(AlertDialog.java:337)
at android.app.Dialog.dispatchOnCreate(Dialog.java:361)
at android.app.Dialog.show(Dialog.java:262)
at android.support.v4.app.DialogFragment.onStart(DialogFragment.java:398)
at android.support.v4.app.Fragment.performStart(Fragment.java:1528)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:972)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1121)
at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1484)
at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:450)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at android.view.LayoutInflater.createView(LayoutInflater.java:594)
            at com.madisp.pretty.LayoutFactoryWrapper.onCreateView(LayoutFactoryWrapper.java:42)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
            at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:3022)
            at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3085)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:286)
            at com.android.internal.app.AlertController.installContent(AlertController.java:240)
            at android.app.AlertDialog.onCreate(AlertDialog.java:337)
            at android.app.Dialog.dispatchOnCreate(Dialog.java:361)
            at android.app.Dialog.show(Dialog.java:262)
            at android.support.v4.app.DialogFragment.onStart(DialogFragment.java:398)
            at android.support.v4.app.Fragment.performStart(Fragment.java:1528)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:972)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1121)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1484)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:450)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5017)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.view.ViewConfiguration.get(ViewConfiguration.java:325)
at android.view.View.(View.java:3448)
at android.view.View.(View.java:3505)
at android.view.ViewGroup.(ViewGroup.java:470)
at android.widget.FrameLayout.(FrameLayout.java:101)
at android.widget.FrameLayout.(FrameLayout.java:97)
            at java.lang.reflect.Constructor.constructNative(Native Method)
            at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
            at android.view.LayoutInflater.createView(LayoutInflater.java:594)
            at com.madisp.pretty.LayoutFactoryWrapper.onCreateView(LayoutFactoryWrapper.java:42)
            at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:469)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
            at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
            at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:3022)
            at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3085)
            at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:286)
            at com.android.internal.app.AlertController.installContent(AlertController.java:240)
            at android.app.AlertDialog.onCreate(AlertDialog.java:337)
            at android.app.Dialog.dispatchOnCreate(Dialog.java:361)
            at android.app.Dialog.show(Dialog.java:262)
            at android.support.v4.app.DialogFragment.onStart(DialogFragment.java:398)
            at android.support.v4.app.Fragment.performStart(Fragment.java:1528)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:972)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1121)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1484)
            at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:450)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5017)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
            at dalvik.system.NativeStart.main(Native Method)

@madisp madisp added the bug label May 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants