android 开发问题
DialogInterface.OnClickListenerss=newDialogInterface.OnClickListener(){@Overridepubli...
DialogInterface.OnClickListener ss = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog,
int which) {
// TODO Auto-generated method stub
// 跳转到登录界面
Intent in = new Intent();
in.setClass(SignIn.this,Login.class);
startActivity(in);
// 销毁当前activity
SignIn.this.onDestroy();
}
};
new AlertDialog.Builder(SignIn.this)
.setTitle("恭喜!").setMessage("注册成功!")
.setPositiveButton("确定", ss).show();
Process: com.example.administrator.poetryrecitation, PID: 4818
java.lang.RuntimeException: Unable to pause activity {com.example.administrator.poetryrecitation/com.example.administrator.poetryrecitation.SignIn}: java.lang.IllegalStateException: No host
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3260)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3219)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3194)
at android.app.ActivityThread.access$1000(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1314)
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.IllegalStateException: No host
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1239)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1234)
at android.support.v4.app.FragmentManagerImpl.dispatchPause(FragmentManager.java:2060)
at android.support.v4.app.FragmentController.dispatchPause(FragmentController.java:207)
at android.support.v4.app.FragmentActivity.onPause(FragmentActivity.java:444)
at android.app.Activity.performPause(Activity.java:6101)
at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1310)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3246)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3219)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3194)
at android.app.ActivityThread.access$1000(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1314)
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)
求问什么问题 展开
@Override
public void onClick(DialogInterface dialog,
int which) {
// TODO Auto-generated method stub
// 跳转到登录界面
Intent in = new Intent();
in.setClass(SignIn.this,Login.class);
startActivity(in);
// 销毁当前activity
SignIn.this.onDestroy();
}
};
new AlertDialog.Builder(SignIn.this)
.setTitle("恭喜!").setMessage("注册成功!")
.setPositiveButton("确定", ss).show();
Process: com.example.administrator.poetryrecitation, PID: 4818
java.lang.RuntimeException: Unable to pause activity {com.example.administrator.poetryrecitation/com.example.administrator.poetryrecitation.SignIn}: java.lang.IllegalStateException: No host
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3260)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3219)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3194)
at android.app.ActivityThread.access$1000(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1314)
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.IllegalStateException: No host
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1239)
at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1234)
at android.support.v4.app.FragmentManagerImpl.dispatchPause(FragmentManager.java:2060)
at android.support.v4.app.FragmentController.dispatchPause(FragmentController.java:207)
at android.support.v4.app.FragmentActivity.onPause(FragmentActivity.java:444)
at android.app.Activity.performPause(Activity.java:6101)
at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1310)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3246)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3219)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:3194)
at android.app.ActivityThread.access$1000(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1314)
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)
求问什么问题 展开
1个回答
微测检测5.10
2023-05-10 广告
2023-05-10 广告
您好!建议咨 深圳市微测检测有限公司,已建立起十余个专业实验室,企业通过微测检测就可以获得一站式的测试与认 证解决方案;(EMC、RF、MFi、BQB、QI、USB、安全、锂电池、快充、汽车电子EMC、汽车手机互 联、语音通话质量),认证遇...
点击进入详情页
本回答由微测检测5.10提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询