Rastgele Activity Geçişi
Arkadaşlar herkese merhaba. Bilgi yarışması uygulaması yapıyorum vede Activity'ler arasında geçiş yaparken zaman zaman BG ( BG uygulama adı) durdu hatası alıyorum.Aşağıdaki kodu eklemeden yani Rastgele Activity geçişi eklemeden önce bu hatayı almıyordum. Acaba nerede hata yapıyorum ?
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
Random rnd1 = new Random();
int x=rnd1.nextInt(4);
Intent myIntent = new Intent();
switch(x){
case 1:
myIntent.setClass(KKK1.this, KK1.class);
break;
case 2:
myIntent.setClass(KKK1.this, KK2.class);
break;
case 3:
myIntent.setClass(KKK1.this, KK3.class);
break;
case 4:
myIntent.setClass(KKK1.this, KK4.class);
break;
}
startActivity(myIntent);
LOG
04-19 10:59:00.272: I/dalvikvm(1464): Could not find method android.view.ViewGroup.onNestedScrollAccepted, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onNestedScrollAccepted
04-19 10:59:00.332: W/dalvikvm(1464): VFY: unable to resolve virtual method 11349: Landroid/view/ViewGroup;.onNestedScrollAccepted (Landroid/view/View;Landroid/view/View;I)V
04-19 10:59:00.332: D/dalvikvm(1464): VFY: replacing opcode 0x6f at 0x0000
04-19 10:59:00.342: I/dalvikvm(1464): Could not find method android.view.ViewGroup.onStopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onStopNestedScroll
04-19 10:59:00.342: W/dalvikvm(1464): VFY: unable to resolve virtual method 11355: Landroid/view/ViewGroup;.onStopNestedScroll (Landroid/view/View;)V
04-19 10:59:00.342: D/dalvikvm(1464): VFY: replacing opcode 0x6f at 0x0000
04-19 10:59:00.352: I/dalvikvm(1464): Could not find method android.support.v7.internal.widget.ActionBarOverlayLayout.stopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.setHideOnContentScrollEnabled
04-19 10:59:00.352: W/dalvikvm(1464): VFY: unable to resolve virtual method 9043: Landroid/support/v7/internal/widget/ActionBarOverlayLayout;.stopNestedScroll ()V
04-19 10:59:00.362: D/dalvikvm(1464): VFY: replacing opcode 0x6e at 0x000e
04-19 10:59:00.572: I/dalvikvm(1464): Could not find method android.view.ViewGroup.onRtlPropertiesChanged, referenced from method android.support.v7.widget.Toolbar.onRtlPropertiesChanged
04-19 10:59:00.582: W/dalvikvm(1464): VFY: unable to resolve virtual method 11352: Landroid/view/ViewGroup;.onRtlPropertiesChanged (I)V
04-19 10:59:00.582: D/dalvikvm(1464): VFY: replacing opcode 0x6f at 0x0007
04-19 10:59:00.642: I/dalvikvm(1464): Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
04-19 10:59:00.642: W/dalvikvm(1464): VFY: unable to resolve virtual method 366: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
04-19 10:59:00.651: D/dalvikvm(1464): VFY: replacing opcode 0x6e at 0x0002
04-19 10:59:00.662: I/dalvikvm(1464): Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType
04-19 10:59:00.662: W/dalvikvm(1464): VFY: unable to resolve virtual method 388: Landroid/content/res/TypedArray;.getType (I)I
04-19 10:59:00.672: D/dalvikvm(1464): VFY: replacing opcode 0x6e at 0x0002
04-19 10:59:01.562: D/dalvikvm(1464): GC_CONCURRENT freed 209K, 9% free 5424K/5959K, paused 23ms+13ms, total 65ms
04-19 10:59:02.452: I/Choreographer(1464): Skipped 1031 frames! The application may be doing too much work on its main thread.
04-19 10:59:02.472: D/gralloc_goldfish(1464): Emulator without GPU emulation detected.
04-19 10:59:17.162: I/Choreographer(1464): Skipped 38 frames! The application may be doing too much work on its main thread.
04-19 10:59:18.932: I/Choreographer(1464): Skipped 42 frames! The application may be doing too much work on its main thread.
04-19 10:59:24.502: I/Choreographer(1464): Skipped 37 frames! The application may be doing too much work on its main thread.
04-19 10:59:28.912: I/Choreographer(1464): Skipped 40 frames! The application may be doing too much work on its main thread.
04-19 10:59:30.471: D/dalvikvm(1464): GC_CONCURRENT freed 98K, 8% free 5731K/6215K, paused 16ms+4ms, total 46ms
04-19 10:59:30.561: I/Choreographer(1464): Skipped 45 frames! The application may be doing too much work on its main thread.
04-19 10:59:30.641: I/Choreographer(1464): Skipped 44 frames! The application may be doing too much work on its main thread.
04-19 10:59:32.032: I/Choreographer(1464): Skipped 33 frames! The application may be doing too much work on its main thread.
04-19 10:59:34.052: I/Choreographer(1464): Skipped 30 frames! The application may be doing too much work on its main thread.
04-19 10:59:34.092: I/Choreographer(1464): Skipped 38 frames! The application may be doing too much work on its main thread.
04-19 10:59:35.782: I/Choreographer(1464): Skipped 51 frames! The application may be doing too much work on its main thread.
04-19 10:59:41.082: I/Choreographer(1464): Skipped 37 frames! The application may be doing too much work on its main thread.
04-19 10:59:42.592: I/Choreographer(1464): Skipped 45 frames! The application may be doing too much work on its main thread.
04-19 10:59:42.782: I/Choreographer(1464): Skipped 35 frames! The application may be doing too much work on its main thread.
04-19 10:59:44.302: I/Choreographer(1464): Skipped 35 frames! The application may be doing too much work on its main thread.
04-19 10:59:46.032: D/dalvikvm(1464): GC_CONCURRENT freed 97K, 8% free 6052K/6535K, paused 2ms+55ms, total 102ms
04-19 10:59:46.102: I/Choreographer(1464): Skipped 136 frames! The application may be doing too much work on its main thread.
04-19 10:59:49.662: I/Choreographer(1464): Skipped 266 frames! The application may be doing too much work on its main thread.
04-19 10:59:49.723: D/AndroidRuntime(1464): Shutting down VM
04-19 10:59:49.723: W/dalvikvm(1464): threadid=1: thread exiting with uncaught exception (group=0xb3e27288)
04-19 10:59:49.752: E/AndroidRuntime(1464): FATAL EXCEPTION: main
04-19 10:59:49.752: E/AndroidRuntime(1464): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.turan.bg/com.turan.bg.KK3}: java.lang.NullPointerException
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.ActivityThread.access$600(ActivityThread.java:130)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.os.Handler.dispatchMessage(Handler.java:99)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.os.Looper.loop(Looper.java:137)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.ActivityThread.main(ActivityThread.java:4745)
04-19 10:59:49.752: E/AndroidRuntime(1464): at java.lang.reflect.Method.invokeNative(Native Method)
04-19 10:59:49.752: E/AndroidRuntime(1464): at java.lang.reflect.Method.invoke(Method.java:511)
04-19 10:59:49.752: E/AndroidRuntime(1464): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
04-19 10:59:49.752: E/AndroidRuntime(1464): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
04-19 10:59:49.752: E/AndroidRuntime(1464): at dalvik.system.NativeStart.main(Native Method)
04-19 10:59:49.752: E/AndroidRuntime(1464): Caused by: java.lang.NullPointerException
04-19 10:59:49.752: E/AndroidRuntime(1464): at com.turan.bg.KK3.onCreate(KK3.java:33)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.Activity.performCreate(Activity.java:5008)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
04-19 10:59:49.752: E/AndroidRuntime(1464): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
04-19 10:59:49.752: E/AndroidRuntime(1464): ... 11 more
04-19 10:59:52.602: E/Trace(1599): error opening trace file: No such file or directory (2)
04-19 10:59:52.863: I/Choreographer(1599): Skipped 38 frames! The application may be doing too much work on its main thread.
04-19 10:59:52.992: I/Choreographer(1599): Skipped 41 frames! The application may be doing too much work on its main thread.
04-19 10:59:53.002: D/gralloc_goldfish(1599): Emulator without GPU emulation detected.