android 4.0 이상, 아마 3.0 이상 사용자에게이 오류가 표시됩니다. 2.3 이하 사용자가 아님 이 문제를 해결하려면 어떻게해야합니까? 빠른 anwser에 기대, 사용자가 불평 :(Android 지원되지 않는 스레드
java.lang.UnsupportedOperationException at java.lang.Thread.stop(Thread.java:1076) at java.lang.Thread.stop(Thread.java:1063) at application.application.Splash$1.run(Splash.java:51)
static int destroy = 0;
보호 부울 _active = TRUE; 보호 INT _splashTime = 5000;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
Thread splashTread = new Thread() {
@Override
public void run() {
try {
int waited = 0;
while(_active && (waited < _splashTime)) {
sleep(100);
if(_active) {
waited += 100;
}
}
} catch(InterruptedException e) {
// do nothing
} finally {
finish();
startActivity(new Intent("app.app.TABHOST"));
stop();
}
}
};
splashTread.start();
}
public boolean onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
_active = false;
}
return true;
}
}
그리고 당신은 당신이 예외를 얻고있는 코드의 비트를 보여줄 수 있다면 ... 난 당신을 돕기 위해 시도 할 수 있습니다 .. – 5hssba
코드 편집 대답을 시도 – Ukjent