0
工作時,我嘗試使用Android版本4 運行我對平板電腦應用程序將無法正常工作,並給在日誌貓應用程序不能在平板電腦
07-04 13:16:28.029: E/AndroidRuntime(688): FATAL EXCEPTION: Thread-94
07-04 13:16:28.029: E/AndroidRuntime(688): java.lang.UnsupportedOperationException
07-04 13:16:28.029: E/AndroidRuntime(688): at java.lang.Thread.stop(Thread.java:1076)
07-04 13:16:28.029: E/AndroidRuntime(688): at java.lang.Thread.stop(Thread.java:1063)
07-04 13:16:28.029: E/AndroidRuntime(688): at com.henanet.dalel.SplashScreen$1.run(SplashScreen.java:48)
07-04 13:16:28.499: I/dalvikvm(688): threadid=3: reacting to signal 3
07-04 13:16:29.121: D/dalvikvm(688): GC_FOR_ALLOC freed 680K, 13% free 6869K/7815K, paused 408ms
07-04 13:16:29.139: E/dalvikvm(688): Unable to open stack trace file '/data/anr/traces.txt': Is a directory
07-04 13:16:29.139: I/dalvikvm(688): threadid=3: reacting to signal 3
07-04 13:16:29.370: E/dalvikvm(688): Unable to open stack trace file '/data/anr/traces.txt': Is a directory
07-04 13:16:30.569: D/dalvikvm(688): GC_CONCURRENT freed 262K, 11% free 7016K/7815K, paused 3ms+4ms
07-04 13:16:31.900: W/dalvikvm(688): threadid=13: thread exiting with uncaught exception (group=0x409c01f8)
07-04 13:16:31.900: I/Process(688): Sending signal. PID: 688 SIG: 9
這個Splash.java這個錯誤,你可以看到很簡單,並請告訴我如何使圖像適合平板電腦
公共類閃屏擴展活動{
//how long until we go to the next activity
protected int _splashTime = 5000;
private Thread splashTread;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.splash);
final SplashScreen sPlashScreen = this;
// thread for displaying the SplashScreen
splashTread = new Thread() {
@Override
public void run() {
try {
synchronized(this){
//wait 5 sec
wait(_splashTime);
}
} catch(InterruptedException e) {}
finally {
finish();
//start a new activity
Intent i = new Intent();
i.setClass(sPlashScreen, MainActivity.class);
startActivity(i);
stop();
}
}
};
splashTread.start();
}
//Function that will handle the touch
@Override
public boolean onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_DOWN) {
synchronized(splashTread){
splashTread.notifyAll();
}
}
return true;
}
}
請張貼'SplashScreen.java'圍繞線48 – tbruyelle
,直到我們看到您的閃屏的代碼,我們不能肯定,但你確定你不是使用平板電腦沒有的某些功能?想想像(後退)攝像頭,電話(短信/電話),有些甚至沒有肖像模式。 –