Discussion Forums  >  Uncategorized

Replies: 1    Views: 177

fusionmtx
Android Fan
Profile
Posts: 178
Reg: Jun 15, 2011
Orlando
2,180
07/31/11 07:50 PM (14 years ago)

1.4 Quiz Issue Android

Trying to figure out this quiz issue. I use my quiz for Trivia and currently have about 80 questions for the one quiz. I have the Number amount of questions set to 21 due to the event it ties in with is in its 21st year(Ive had it set to all kinds of amounts and i still get the error). After what seems like a heck of a long time testing and trying to see what gives me the Force Close App, Ive finally came to a conclusion. The quiz only force closes if i get 9 right in a row starting with question 1 when it attempts to go to Question number 10, but only if the amount of questions is set from 10 and up . However, If i set the amount of questions per round below 10 (1-9) It works perfectly with no problem when i get them all right. Is there any fix to this? Sorry if i made this sound confusing. tried to be as detailed as possible. Here is the error report. java.lang.IndexOutOfBoundsException: Invalid index 10, size is 10 at java.util.ArrayList.throwIndexOutOfBoundsException(ArrayList.java:257) at java.util.ArrayList.get(ArrayList.java:311) at com.v1_4.B60E6D01565D444A597A8FCB.com.Screen_QuizMultipleChoice.answerClick(Screen_QuizMultipleChoice.java:312) at com.v1_4.B60E6D01565D444A597A8FCB.com.Screen_QuizMultipleChoice$8.onClick(Screen_QuizMultipleChoice.java:160) at android.view.View.performClick(View.java:2408) at android.view.View$PerformClick.run(View.java:8817) at android.os.Handler.handleCallback(Handler.java:587) at android.os.Handler.dispatchMessage(Handler.java:92) at android.os.Looper.loop(Looper.java:144) at android.app.ActivityThread.main(ActivityThread.java:4937) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:521) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) at dalvik.system.NativeStart.main(Native Method)
 
fusionmtx
Android Fan
Profile
Posts: 178
Reg: Jun 15, 2011
Orlando
2,180
like
07/31/11 08:17 PM (14 years ago)
I went looking through all the forum pages and found this http://www.buzztouch.com/forum/thread.php?tid=BAA504832D083308FA58798&status=&searchInput=crash&sortColumn=FT.dateStampUTC&sortUpDown=DESC¤tPage=1&doViews=1 So basicly I got my error fixed for now, but does this mean i have to add..... tmpImg = BitmapFactory.decodeResource(getResources(),R.drawable.quiz_10x); bonusImages.add(tmpImg); 11x, 12x, 13x, 15x all the way up to where I want my quiz to finish at to prevent it from crashing?
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.