0

i'm totally new in Android and i installed the android-sdk-windows in my laptop. And i tried the very simple code of Hello, when i launch the code i get this error, why please? Thank you

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (classFileParser.cpp:3375), pid=6584, tid=7084
#  Error: ShouldNotReachHere()
#
# JRE version: 6.0_24-b07
# Java VM: Java HotSpot(TM) Client VM (19.1-b02 mixed mode windows-x86 )
# An error report file with more information is saved as:
# D:\Eclipse\workspace\Now\hs_err_pid6584.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
MByD
  • 135,866
  • 28
  • 264
  • 277
Pacific
  • 195
  • 2
  • 6
  • 17
  • 2
    [Google](https://www.google.com/search?gcx=c&ie=UTF-8&q=Internal+Error+(classFileParser.cpp%3A3375)) gives some great results. Some of them direct to this site as well. – MByD Nov 27 '11 at 02:13

1 Answers1

3

Follow these steps:

  1. Run -> Run As -> Run configurations
  2. Remove Android Library in the recently created JUnit configuration Classpath's Bootstrap Entries
  3. Add Library, using "Advanced" button, add JRE System Library and JUnit 3
  4. Apply and Run

Ref: Diego Torres Milano's blog

bilash.saha
  • 7,226
  • 2
  • 35
  • 40
  • 1
    OK i understand the first step but fro the second step, i see JUnit but there is nothing under this and i don't see the Android Library, Thank you – Pacific Nov 27 '11 at 02:54
  • OK after your answer i have another error message now: – Pacific Nov 27 '11 at 02:57
  • what is your current error message ? – bilash.saha Nov 27 '11 at 02:59
  • this is the error message:Exception in thread "main" java.lang.NoClassDefFoundError: android/app/Activity at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$000(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) – Pacific Nov 27 '11 at 03:01
  • Ok i run it as android application and i have a new ugly window like a smartphone with the title: 5554:my_avd and it happens nothing – Pacific Nov 27 '11 at 03:09
  • .Answer to your previous question.have you added JRE System Library ? This occurs because the classpath is not setup or referenced correctly. – bilash.saha Nov 27 '11 at 03:13
  • Ok.Now,Your application is running without exceptions ? – bilash.saha Nov 27 '11 at 03:14
  • I'm expecting to see Hello, Android on the new screen but i see only the Android logo and in the console i shave this: [2011-11-26 22:07:39 - HelloAndroid] New emulator found: emulator-5554 [2011-11-26 22:07:39 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched... – Pacific Nov 27 '11 at 03:15
  • Yes here is the code : package com.example.helloandroid; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TextView tv = new TextView(this); tv.setText("Hello, Android"); setContentView(tv); } } – Pacific Nov 27 '11 at 03:16
  • Have a look at http://stackoverflow.com/questions/2160454/helloandroidemulator-5554-disconnected-cancelling-com-example-helloandroid-he – bilash.saha Nov 27 '11 at 03:17