Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid program does not run on emulator
    primarykey
    data
    text
    <p>I recently started working with Eclipse to build Android Applications. I have made a small Hello_World kind of application with a small table in it. The XML code is provided below...</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:weightSum="1" android:orientation="vertical"&gt; &lt;TextView android:textAppearance="?android:attr/textAppearanceMedium" android:id="@+id/textView1" android:layout_height="wrap_content" android:text="Hello World!" android:layout_width="wrap_content" /&gt; &lt;TableLayout android:layout_height="302dp" android:padding="5dp" android:layout_width="match_parent" android:id="@+id/TransactionLog"&gt; &lt;TableRow android:layout_height="wrap_content"&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="Date" android:layout_width="0dip" android:id="@+id/dateLabel"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="Details" android:layout_width="0dip" android:id="@+id/detailsLabel"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="Debit" android:layout_width="0dip" android:id="@+id/debitLabel"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="Credit" android:layout_width="0dip" android:id="@+id/creditLabel"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="Balance" android:layout_width="0dip" android:id="@+id/balanceLabel"&gt;&lt;/TextView&gt; &lt;/TableRow&gt; &lt;TableRow android:layout_height="wrap_content"&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="5 October 2011" android:layout_width="0dip" android:id="@+id/date1"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="CoCoa Shop" android:layout_width="0dip" android:id="@+id/details1"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="123.53" android:layout_width="0dip" android:id="@+id/debit1"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="0.00" android:layout_width="0dip" android:id="@+id/credit1"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="6729.32" android:layout_width="0dip" android:id="@+id/balance1"&gt;&lt;/TextView&gt; &lt;/TableRow&gt; &lt;TableRow android:layout_height="wrap_content"&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="4 October 2011" android:layout_width="0dip" android:id="@+id/date1"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="Best Sell" android:layout_width="0dip" android:id="@+id/details1"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="900.53" android:layout_width="0dip" android:id="@+id/debit1"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="0.00" android:layout_width="0dip" android:id="@+id/credit1"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="6729.32" android:layout_width="0dip" android:id="@+id/balance1"&gt;&lt;/TextView&gt; &lt;/TableRow&gt; &lt;TableRow android:layout_height="wrap_content"&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="4 October 2011" android:layout_width="0dip" android:id="@+id/date1"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="Deposit" android:layout_width="0dip" android:id="@+id/details1"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="0.00" android:layout_width="0dip" android:id="@+id/debit1"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="9500.00" android:layout_width="0dip" android:id="@+id/credit1"&gt;&lt;/TextView&gt; &lt;TextView android:layout_margin="4dip" android:layout_weight="1" android:padding="10dip" android:layout_height="wrap_content" android:text="6729.32" android:layout_width="0dip" android:id="@+id/balance1"&gt;&lt;/TextView&gt; &lt;/TableRow&gt; &lt;/TableLayout&gt; &lt;/LinearLayout&gt; </code></pre> <p>Here is the Java code for the Hello_World app...</p> <pre><code>package com.example.helloandroid2; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class HelloAndroid2Activity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView tv = new TextView(this); tv.setText("Hello, Android"); setContentView(tv); } } </code></pre> <p>However, when I try to run my app, it shows the following error... Can anyone please help me figure out where I am making an error?</p> <pre><code># # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (classFileParser.cpp:3470), pid=5220, tid=2000 # Error: ShouldNotReachHere() # # JRE version: 7.0-b147 # Java VM: Java HotSpot(TM) Client VM (21.0-b17 mixed mode windows-x86 ) # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # An error report file with more information is saved as: # C:\Documents and Settings\s4778694\workspace\HelloAndroid2\hs_err_pid5220.log # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # </code></pre> <p><em><strong>EDIT</em></strong></p> <p>This is what it says in the .log file (Sorry I couldnt identify the main points in the file, so I posted the whole of it instead)</p> <pre><code># # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (classFileParser.cpp:3470), pid=5220, tid=2000 # Error: ShouldNotReachHere() # # JRE version: 7.0-b147 # Java VM: Java HotSpot(TM) Client VM (21.0-b17 mixed mode windows-x86 ) # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows # # If you would like to submit a bug report, please visit: # http://bugreport.sun.com/bugreport/crash.jsp # --------------- T H R E A D --------------- Current thread (0x003d7000): JavaThread "Unknown thread" [_thread_in_vm, id=2000, stack(0x00900000,0x00950000)] Stack: [0x00900000,0x00950000], sp=0x0094f6dc, free space=317k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [jvm.dll+0x1630e1] V [jvm.dll+0x15dcfb] V [jvm.dll+0x18e37] V [jvm.dll+0x1a6a8] V [jvm.dll+0x2a42f] V [jvm.dll+0x2b818] V [jvm.dll+0x2bedb] V [jvm.dll+0x2bf2a] V [jvm.dll+0x2c07d] V [jvm.dll+0x2c15a] V [jvm.dll+0x2c3d7] V [jvm.dll+0x73cb1] V [jvm.dll+0x7406b] V [jvm.dll+0x121a7c] V [jvm.dll+0x14382a] V [jvm.dll+0xa2940] C [javaw.exe+0x1359] C [javaw.exe+0x1dc9] C [javaw.exe+0xa0cb] C [javaw.exe+0xa155] C [kernel32.dll+0xb729] GetModuleFileNameA+0x1ba --------------- P R O C E S S --------------- Java Threads: ( =&gt; current thread ) Other Threads: =&gt;0x003d7000 (exited) JavaThread "Unknown thread" [_thread_in_vm, id=2000, stack(0x00900000,0x00950000)] VM state:not at safepoint (not fully initialized) VM Mutex/Monitor currently owned by a thread: None Dynamic libraries: 0x00400000 - 0x0042f000 C:\Program Files\Java\jre7\bin\javaw.exe 0x7c900000 - 0x7c9b2000 C:\WINDOWS\system32\ntdll.dll 0x7c800000 - 0x7c8f6000 C:\WINDOWS\system32\kernel32.dll 0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll 0x77e70000 - 0x77f03000 C:\WINDOWS\system32\RPCRT4.dll 0x77fe0000 - 0x77ff1000 C:\WINDOWS\system32\Secur32.dll 0x7e410000 - 0x7e4a1000 C:\WINDOWS\system32\USER32.dll 0x77f10000 - 0x77f59000 C:\WINDOWS\system32\GDI32.dll 0x773d0000 - 0x774d3000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\COMCTL32.dll 0x77c10000 - 0x77c68000 C:\WINDOWS\system32\msvcrt.dll 0x77f60000 - 0x77fd6000 C:\WINDOWS\system32\SHLWAPI.dll 0x76390000 - 0x763ad000 C:\WINDOWS\system32\IMM32.DLL 0x629c0000 - 0x629c9000 C:\WINDOWS\system32\LPK.DLL 0x74d90000 - 0x74dfb000 C:\WINDOWS\system32\USP10.dll 0x78aa0000 - 0x78b5e000 C:\Program Files\Java\jre7\bin\msvcr100.dll 0x6d940000 - 0x6dc61000 C:\Program Files\Java\jre7\bin\client\jvm.dll 0x71ad0000 - 0x71ad9000 C:\WINDOWS\system32\WSOCK32.dll 0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll 0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll 0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll 0x76bf0000 - 0x76bfb000 C:\WINDOWS\system32\PSAPI.DLL 0x6d8d0000 - 0x6d8dc000 C:\Program Files\Java\jre7\bin\verify.dll 0x6d370000 - 0x6d390000 C:\Program Files\Java\jre7\bin\java.dll 0x6d920000 - 0x6d933000 C:\Program Files\Java\jre7\bin\zip.dll VM Arguments: jvm_args: -Dfile.encoding=Cp1252 -Xbootclasspath:C:\Program Files\Android\android-sdk\platforms\android-13\android.jar java_command: &lt;unknown&gt; Launcher Type: SUN_STANDARD Environment Variables: CLASSPATH=.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip PATH=C:/Program Files/Java/jre7/bin/client;C:/Program Files/Java/jre7/bin;C:/Program Files/Java/jre7/lib/i386;C:\php\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ThinkPad\ConnectUtilities;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\QuickTime\QTSystem\;C:\Program Files\TortoiseSVN\bin;C:\Documents and Settings\s4778694\Desktop\eclipse; USERNAME=s4778694 OS=Windows_NT PROCESSOR_IDENTIFIER=x86 Family 6 Model 14 Stepping 8, GenuineIntel --------------- S Y S T E M --------------- OS: Windows XP Build 2600 Service Pack 3 CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 14 stepping 8, cmov, cx8, fxsr, mmx, sse, sse2, sse3 Memory: 4k page, physical 1046864k(59376k free), swap 2514760k(1088876k free) vm_info: Java HotSpot(TM) Client VM (21.0-b17) for windows-x86 JRE (1.7.0-b147), built on Jun 27 2011 02:25:52 by "java_re" with unknown MS VC++:1600 time: Wed Oct 05 14:05:49 2011 elapsed time: 0 seconds </code></pre>
    singulars
    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.
 

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