Soru & Cevap

Androtudio LogChat Hatası

14.02.2016 - 03:48

Merhaba Arkadaşlar Android'e yeni başladım Android Studio da uygulama yazmaya çalısıyorum.Emulatorde ve kendi telefonumda uygulamayı açınca splash screen den sonra uygulama durduruldu diyip kapanıyor.LogChat ekranı:

Nasıl Düzeltebilirim ???

Teşekkürler..

FATAL EXCEPTION: main
Process: com.gurgurfrt.hdwallpaper, PID: 3266
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gurgurfrt.hdwallpaper/com.gurgurfrt.hdwallpaper.MainActivity}: 

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Gallery.setAdapter

(android.widget.SpinnerAdapter)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
at android.app.ActivityThread.-wrap11(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Gallery.setAdapter

(android.widget.SpinnerAdapter)' on a null object reference
at com.gurgurfrt.hdwallpaper.MainActivity.onCreate(MainActivity.java:40)
at android.app.Activity.performCreate(Activity.java:6237)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) 
at android.app.ActivityThread.-wrap11(ActivityThread.java) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:148) 
at android.app.ActivityThread.main(ActivityThread.java:5417) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 

9 Görüntülenme

1 Cevap

Sitedeki sorulara cevap verebilmek için giriş yapın ya da üye olun.

picture-11052-1576825910.jpg
alikarakoc
14.02.2016 - 10:16

Firat kodlarını da paylaşabilirsen daha iyi olabilir.