Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is for loop not working for platform 4.2 (API 17)?
    primarykey
    data
    text
    <p>I have the following for loop code that will not work on 4.2\API17. the code calls a Data Model class and iterates. The Logcat shows that is happening. I am trying to get a Plist(xml) parser to work. It all works fine on 2.2\API 8</p> <pre><code> String xml = readPlistFromAssets(); // create object of Parser Class ParsePlist pp = new ParsePlist(); // parse Plist and fill in plist array ArrayList&lt;DataModel&gt; plist = pp.parsePlist(xml); // Print ArrayList Iterator&lt;DataModel&gt; i = plist.iterator(); Log.i("Plist","======================33==="); for(String key = null; i.hasNext();) { Log.i("Plist","==========for loop======="); DataModel d = i.next(); eventT = d.getEventTitle(); Log.v("Event Title...........", eventT); } while(i.hasNext()){ DataModel d = i.next(); Log.i("Plist","========================="); Log.i("Plist","Descript: " + d.getAbout()); Log.i("Plist","BandName: " + d.getTitle()); Log.i("Plist ", "Venu: " + d.getVenue()); } </code></pre> <p>LogCat</p> <pre><code>08-02 16:30:22.165: W/Trace(3670): Unexpected value from nativeGetEnabledTags: 0 08-02 16:30:35.447: W/Trace(4311): Unexpected value from nativeGetEnabledTags: 0 08-02 16:30:35.447: W/Trace(4311): Unexpected value from nativeGetEnabledTags: 0 08-02 16:30:36.077: D/dalvikvm(4311): GC_FOR_ALLOC freed 72K, 7% free 2520K/2708K, paused 68ms, total 71ms 08-02 16:30:36.077: I/dalvikvm-heap(4311): Grow heap (frag case) to 3.158MB for 614416-byte allocation 08-02 16:30:36.155: D/dalvikvm(4311): GC_FOR_ALLOC freed 1K, 6% free 3119K/3312K, paused 69ms, total 69ms 08-02 16:30:36.245: D/dalvikvm(4311): GC_CONCURRENT freed &lt;1K, 6% free 3119K/3312K, paused 5ms+3ms, total 90ms 08-02 16:30:36.394: D/dalvikvm(4311): GC_FOR_ALLOC freed &lt;1K, 6% free 3119K/3312K, paused 34ms, total 34ms 08-02 16:30:36.415: I/dalvikvm-heap(4311): Grow heap (frag case) to 4.199MB for 1093136-byte allocation 08-02 16:30:36.568: D/dalvikvm(4311): GC_CONCURRENT freed 0K, 5% free 4186K/4380K, paused 5ms+14ms, total 85ms 08-02 16:30:36.675: W/Trace(4311): Unexpected value from nativeGetEnabledTags: 0 08-02 16:30:36.675: W/Trace(4311): Unexpected value from nativeGetEnabledTags: 0 08-02 16:30:36.698: W/Trace(4311): Unexpected value from nativeGetEnabledTags: 0 08-02 16:30:36.736: W/Trace(4311): Unexpected value from nativeGetEnabledTags: 0 08-02 16:30:37.274: D/gralloc_goldfish(4311): Emulator without GPU emulation detected. 08-02 16:30:37.844: W/Trace(4311): Unexpected value from nativeGetEnabledTags: 0 08-02 16:30:37.905: W/Trace(4311): Unexpected value from nativeGetEnabledTags: 0 08-02 16:30:39.636: W/Trace(4311): Unexpected value from nativeGetEnabledTags: 0 08-02 16:30:39.804: W/Trace(4311): Unexpected value from nativeGetEnabledTags: 0 08-02 16:30:39.804: W/Trace(4311): Unexpected value from nativeGetEnabledTags: 0 08-02 16:30:40.104: D/dalvikvm(4311): GC_FOR_ALLOC freed 664K, 19% free 3617K/4420K, paused 155ms, total 170ms 08-02 16:30:40.104: I/dalvikvm-heap(4311): Grow heap (frag case) to 4.229MB for 614416-byte allocation 08-02 16:30:40.264: D/dalvikvm(4311): GC_CONCURRENT freed &lt;1K, 5% free 4217K/4420K, paused 6ms+52ms, total 123ms 08-02 16:30:40.664: D/dalvikvm(4311): GC_FOR_ALLOC freed &lt;1K, 5% free 4217K/4420K, paused 63ms, total 63ms 08-02 16:30:40.704: I/dalvikvm-heap(4311): Grow heap (frag case) to 5.271MB for 1093136-byte allocation 08-02 16:30:40.904: D/dalvikvm(4311): GC_CONCURRENT freed 0K, 4% free 5284K/5488K, paused 84ms+20ms, total 203ms 08-02 16:30:41.274: D/LOG_TAG(4311): PATH: /mnt/sdcard/download/ 08-02 16:30:41.274: I/Plist(4311): ======================1=== 08-02 16:30:41.294: I/Plist(4311): =======================2== 08-02 16:30:41.534: I/Plist(4311): =======================3== 08-02 16:30:41.564: I/Plist(4311): ======================22=== 08-02 16:30:42.764: I/Hit(4311): **********************Parse Plist******** hit *** 08-02 16:30:42.784: I/Hit(4311): 222222222222222****Parse Plist******** hit *** 08-02 16:30:42.784: I/Hit(4311): **********************Parse Plist******** hit *** 08-02 16:30:42.804: I/Hit(4311): 222222222222222****Parse Plist******** hit *** 08-02 16:30:42.804: I/Hit(4311): **********************Parse Plist******** hit *** 08-02 16:30:42.824: I/Hit(4311): 222222222222222****Parse Plist******** hit *** 08-02 16:30:42.824: I/Hit(4311): **********************Parse Plist******** hit *** 08-02 16:30:42.844: I/Hit(4311): 222222222222222****Parse Plist******** hit *** 08-02 16:30:42.844: I/Hit(4311): **********************Parse Plist******** hit *** 08-02 16:30:42.864: I/Hit(4311): 222222222222222****Parse Plist******** hit *** 08-02 16:30:42.898: I/Hit(4311): **********************Parse Plist******** hit *** 08-02 16:30:42.904: I/Hit(4311): 222222222222222****Parse Plist******** hit *** 08-02 16:30:42.916: I/Hit(4311): **********************Parse Plist******** hit *** 08-02 16:30:42.944: I/Hit(4311): 222222222222222****Parse Plist******** hit *** 08-02 16:30:42.944: I/Hit(4311): **********************Parse Plist******** hit *** 08-02 16:30:42.964: I/Hit(4311): 222222222222222****Parse Plist******** hit *** 08-02 16:30:45.784: I/Plist(4311): ======================33=== 08-02 16:30:45.916: W/Trace(4311): Unexpected value from nativeGetEnabledTags: 0 08-02 16:30:45.916: W/Trace(4311): Unexpected value from nativeGetEnabledTags: 0 </code></pre> <p>Any clues or guidance is greatly appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload