1. toyanc's Avatar
    [BOX][/BOX]I am new to android programming. I tried to execute a app from one of the tutorials and it is showing runtime error. If it runs highscores menu. Application closed. Below are the error messages from logcat and the activity file. Appreciate your help. Thanks in advance.
    Error
    Code:
    12-15 03:49:51.124: I/HighScores(1115): getScores() called
    12-15 03:49:51.154: I/HighScores(1115): getScores() no scores found
    12-15 03:49:51.354: I/Reversi, RevHSCustAd getView called(1115): position = 0
    12-15 03:49:51.444: I/Reversi, RevHSCustAd getView called(1115): position = 0
    12-15 03:49:51.454: D/AndroidRuntime(1115): Shutting down VM
    12-15 03:49:51.454: W/dalvikvm(1115): threadid=1: thread exiting with uncaught exception (group=0xb2a40ba8)
    12-15 03:49:51.594: D/dalvikvm(1115): GC_FOR_ALLOC freed 447K, 11% free 4353K/4880K, paused 89ms, total 100ms
    12-15 03:49:51.714: E/AndroidRuntime(1115): FATAL EXCEPTION: main
    12-15 03:49:51.714: E/AndroidRuntime(1115): Process: uk.co.flumeland.reversi, PID: 1115
    12-15 03:49:51.714: E/AndroidRuntime(1115): java.lang.NullPointerException
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at uk.co.flumeland.reversi.RevHighScoreAdapter.getView(RevHighScoreAdapter.java:68)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.widget.AbsListView.obtainView(AbsListView.java:2263)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.widget.ListView.measureHeightOfChildren(ListView.java:1263)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.widget.ListView.onMeasure(ListView.java:1175)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.View.measure(View.java:16497)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1404)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.widget.LinearLayout.measureVertical(LinearLayout.java:695)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.widget.LinearLayout.onMeasure(LinearLayout.java:588)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.View.measure(View.java:16497)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.View.measure(View.java:16497)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at com.android.internal.widget.ActionBarOverlayLayout.onMeasure(ActionBarOverlayLayout.java:327)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.View.measure(View.java:16497)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:5125)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.widget.FrameLayout.onMeasure(FrameLayout.java:310)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at com.android.internal.policy.impl.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:2291)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.View.measure(View.java:16497)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:1916)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1113)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1295)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1000)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5670)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.Choreographer.doCallbacks(Choreographer.java:574)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.Choreographer.doFrame(Choreographer.java:544)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.os.Handler.handleCallback(Handler.java:733)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.os.Handler.dispatchMessage(Handler.java:95)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.os.Looper.loop(Looper.java:136)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at android.app.ActivityThread.main(ActivityThread.java:5017)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at java.lang.reflect.Method.invokeNative(Native Method)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at java.lang.reflect.Method.invoke(Method.java:515)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
    12-15 03:49:51.714: E/AndroidRuntime(1115):     at dalvik.system.NativeStart.main(Native Method)
    12-15 03:49:51.864: W/CursorWrapperInner(1115): Cursor finalized without prior close()
    12-15 03:49:54.184: I/Process(1115): Sending signal. PID: 1115 SIG: 9
    RevHighScoreAdapter.java

    Why does my Android crash when app is high score menu opened?-adaptor.png
    Attached Thumbnails Why does my Android crash when app is high score menu opened?-adaptor.png   Why does my Android crash when app is high score menu opened?-adaptor.png  
    01-07-2015 03:32 PM
  2. yopablo's Avatar
    Hi,

    You have a NullPointerException at RevHighScoreAdapter, line number 68, but it's quite hard to see what this line is in your class. Could you give us more information or post the full file in text.

    Regards
    01-26-2015 06:17 AM

Similar Threads

  1. Is my LG G3 battery from Del Boy and Rodney ?!
    By dataintmybaby in forum LG G3
    Replies: 20
    Last Post: 01-31-2015, 05:15 PM
  2. Battery saving and speed boosting apps do they really work?
    By mohit9206 in forum General News & Discussion
    Replies: 9
    Last Post: 01-24-2015, 09:39 AM
  3. What is rooting?
    By mikecomp93 in forum Samsung Galaxy S5
    Replies: 5
    Last Post: 01-08-2015, 09:51 PM
  4. How Much is my Like-New Note 2 Worth?
    By SHIVA77 in forum Verizon Galaxy Note 2
    Replies: 2
    Last Post: 01-07-2015, 04:24 PM
  5. How do I root my Sony z c6603 Kingo Android?
    By Alan Cormack in forum Ask a Question
    Replies: 1
    Last Post: 01-07-2015, 03:03 PM
LINK TO POST COPIED TO CLIPBOARD