我的应用程序启动画面在 android 4.0 冰淇淋三明治上失败
我目前在市场上有一个简单的应用程序,现在我尝试将其安装在 Android 4.0 设备上。 但在我的闪屏关闭后它失败了。我发送了一份融洽关系并得到了反馈:
Crash
java.lang.UnsupportedOperationException
Thread.stop()
这
java.lang.UnsupportedOperationException
at java.lang.Thread.stop(Thread.java:1076)
at java.lang.Thread.stop(Thread.java:1063)
at com.lars.PSVWebView.SplashScreen$1.run(SplashScreen.java:35)
是自上次编辑以来的代码:
package com.lars.DrinkRecOrder;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
public class SplashScreen extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
Intent intent = new Intent();
intent.setClass(SplashScreen.this, DrinkRecOrderActivity.class);
}{
/* start the activity */
startActivity(new Intent("com.lars.DrinkRecorder.splashscreen.DrinkRecorderActivity"));
}
}, 500);
}
}
所以这是我的新代码...没有错误,但也不起作用,我的应用程序在启动时崩溃。 顺便说一句...相同的启动屏幕代码,不同的应用程序
I currently have a simple app in the market, now I tried installing it on an Android 4.0 device.
But it fails after my Splashscreen closes. I send a rapport and got this as feedback:
Crash
java.lang.UnsupportedOperationException
Thread.stop()
and
java.lang.UnsupportedOperationException
at java.lang.Thread.stop(Thread.java:1076)
at java.lang.Thread.stop(Thread.java:1063)
at com.lars.PSVWebView.SplashScreen$1.run(SplashScreen.java:35)
this is the code, since last edit:
package com.lars.DrinkRecOrder;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
public class SplashScreen extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Handler handler = new Handler();
handler.postDelayed(new Runnable() {
public void run() {
Intent intent = new Intent();
intent.setClass(SplashScreen.this, DrinkRecOrderActivity.class);
}{
/* start the activity */
startActivity(new Intent("com.lars.DrinkRecorder.splashscreen.DrinkRecorderActivity"));
}
}, 500);
}
}
So this is my new code... no errors, but doesn't work either, my app crashes at startup.
By the way... same splashscreen code, different app
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你可以使用这个方法:
我认为它比 Thread.sleep() 更好、更优雅。
You can use this method:
I think it's far better and elegant than
Thread.sleep()
阅读文档<代码>Thread.stop()。
Read the documentation on
Thread.stop()
.这就是答案!
This was the answer!