尝试从Eclipse初始化Android 1.6 Emulator时出错

时间:2012-06-17 13:51:36

标签: eclipse android-emulator initialization

我是一名自学Java巨头。

参考我提出的类似的早期问题:

Earlier Question regarding error loading Android VD from Eclipse

在提出上一个类似的问题之后@alextsc推荐我将已安装的jdk版本从JDK1.7.0_03更改为版本jdk 6,因为Android工具仅适用于版本jdk 6(1.6)

我已经完成,然后更改了项目设置: 我检查了项目设置下Java编译器中的默认合规性设置是1.6 我更改了项目的运行配置 - 确保jre设置为版本jre6 另外,我将windows环境变量更改为... java \ jdk1.6.0_04

希望这会允许我的项目编译 - 但它没有!

现在我的问题是:

如何使用jdk 1.6编译项目?

还需要配置什么?

  • 在一天结束时我只想在Android 1.6 Emulator上安装一个HelloWorld测试程序 - 从Eclipse IDE环境运行。

我确实再次尝试运行默认代码,如下所示:

package com.leigh.namespace;

import android.app.Activity;
import android.os.Bundle;

public class HelloWorldActivity extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}

我已经从AVD管理器成功启动了Android 1.6 VM,因此VM软件似乎是O.K。

并且源代码似乎是o.k - 并且是应该初始化VM的默认代码: 这次我收到了一条不同的错误信息,如下:

# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (classFileParser.cpp:3494), pid=5904, tid=3496
#  Error: ShouldNotReachHere()
#
# JRE version: 6.0_27-b07
# Java VM: Java HotSpot(TM) Client VM (20.2-b06 mixed mode windows-x86 )
# An error report file with more information is saved as:
# C:\Users\leighman\workspace\HelloWorld\hs_err_pid5904.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

,日志文件在这里:

  

--------------- T H R E A D ---------------

     

当前线程(0x018a9c00):JavaThread"未知线程"   [_thread_in_vm,id = 3516,stack(0x00350000,0x003a0000)]

     

堆栈:[0x00350000,0x003a0000],sp = 0x0039f86c,可用空间= 318k   本机帧:(J =已编译的Java代码,j =已解释,Vv = VM代码,   C =本机代码)V [jvm.dll + 0x1335ba] V [jvm.dll + 0x12e56b] V   [jvm.dll + 0x1639e] V [jvm.dll + 0x17bdf] V [jvm.dll + 0x26cc5] V   [jvm.dll + 0x27506] V [jvm.dll + 0x278b5] V [jvm.dll + 0x27949] V   [jvm.dll + 0x27a0c] V [jvm.dll + 0x27a8a] V [jvm.dll + 0x27b6d] V   [jvm.dll + 0x27e39] V [jvm.dll + 0x6c383] V [jvm.dll + 0x6c75c] V   [jvm.dll + 0xf9b4c] V [jvm.dll + 0x11848b] V [jvm.dll + 0x9eb60] C   [javaw.exe + 0x1657] C [javaw.exe + 0x1e2c] C [javaw.exe + 0x8614] C   [kernel32.dll + 0x4ed6c] BaseThreadInitThunk + 0x12 C.   [ntdll.dll + 0x6377b] RtlInitializeExceptionChain + 0xef C.   [ntdll.dll + 0x6374e] RtlInitializeExceptionChain + 0xc2

     

--------------- P R O C E S S ---------------

     

Java线程:( =>当前线程)

     

其他主题:

     

=> 0x018a9c00(退出)JavaThread"未知线程" [_thread_in_vm,id = 3516,stack(0x00350000,0x003a0000)]

     

VM状态:不在安全点(未完全初始化)

     

VM Mutex / Monitor当前由线程拥有:无

     

动态库:0x00400000 - 0x00424000 C:\ Program   Files \ Java \ jre6 \ bin \ javaw.exe 0x77bf0000 - 0x77d2c000     C:\ windows \ SYSTEM32 \ ntdll.dll 0x77410000 - 0x774e4000     C:\ windows \ system32 \ kernel32.dll 0x75f20000 - 0x75f6a000     C:\ windows \ system32 \ KERNELBASE.dll 0x76220000 - 0x762c0000     C:\ windows \ system32 \ ADVAPI32.dll 0x776c0000 - 0x7776c000     C:\ windows \ system32 \ msvcrt.dll 0x76370000 - 0x76389000     C:\ windows \ SYSTEM32 \ sechost.dll 0x760a0000 - 0x76141000     C:\ windows \ system32 \ RPCRT4.dll 0x775f0000 - 0x776b9000     C:\ windows \ system32 \ USER32.dll 0x77340000 - 0x7738e000     C:\ windows \ system32 \ GDI32.dll 0x77d80000 - 0x77d8a000     C:\ windows \ system32 \ LPK.dll 0x774f0000 - 0x7758d000     C:\ windows \ system32 \ USP10.dll 0x77390000 - 0x773af000     C:\ windows \ system32 \ IMM32.DLL 0x76150000 - 0x7621c000     C:\ windows \ system32 \ MSCTF.dll 0x7c340000 - 0x7c396000 C:\ Program   Files \ Java \ jre6 \ bin \ msvcr71.dll 0x6d7f0000 - 0x6da9f000 C:\ Program   Files \ Java \ jre6 \ bin \ client \ jvm.dll 0x73fb0000 - 0x73fe2000     C:\ windows \ system32 \ WINMM.dll 0x75c80000 - 0x75ccc000     C:\ windows \ system32 \ apphelp.dll 0x6d7a0000 - 0x6d7ac000 C:\ Program   Files \ Java \ jre6 \ bin \ verify.dll 0x6d320000 - 0x6d33f000 C:\ Program   Files \ Java \ jre6 \ bin \ java.dll 0x6d370000 - 0x6d399000 C:\ Program   Files \ Java \ jre6 \ bin \ jdwp.dll 0x6d690000 - 0x6d696000 C:\ Program   Files \ Java \ jre6 \ bin \ npt.dll 0x6d7e0000 - 0x6d7ef000 C:\ Program   Files \ Java \ jre6 \ bin \ zip.dll 0x76090000 - 0x76095000     C:\ Windows \ System32下\ PSAPI.DLL

     

VM参数:jvm_args:   -agentlib:jdwp = transport = dt_socket,suspend = y,address = localhost:1554 -Dfile.encoding = Cp1252 -Xbootclasspath:C:\ Program Files \ Android \ android-sdk \ platforms \ android-4 \ android.jar   java_command:com.leigh.namespace.HelloWorldActivity启动器类型:   SUN_STANDARD

     

环境变量:CLASSPATH =。; .. PATH = C:/ Program   Files / Java / jre7 / bin / client; C:/ Program Files / Java / jre7 / bin; C:/ Program   Files / Java / jre7 / lib / i386; C:\ Program Files \ Common Files \ Microsoft   共享\的Windows   生活; C:\ WINDOWS \ SYSTEM32; C:\ WINDOWS; C:\ WINDOWS \ SYSTEM32 \ WBEM; C:\ WINDOWS \ SYSTEM32 \ WindowsPowerShell \ V1.0 \; C:\ PROGRAM   Files \ Broadcom \ Broadcom 802.11网络适配器\驱动程序; C:\ Program   Files \ Windows Live \ Shared; C:\ Program Files \ WIDCOMM \ Bluetooth   Software \; C:\ Program Files \ QuickTime \ QTSystem \; C:\ Program   Files \ Microsoft ASP.NET \ ASP.NET Web Pages \ v1.0 \; C:\ Program   Files \ Microsoft SQL Server \ 110 \ Tools \ Binn \; c:\ Profram   文件\的Java \ jdk1.7.0_03 \ BIN; C:\ Eclipse的\蚀; USERNAME = leighman   OS = Windows_NT PROCESSOR_IDENTIFIER = x86 Family 6 Model 28 Stepping 10,   GenuineIntel

     

--------------- S Y S T E M ---------------

     

操作系统:Windows 7 Build 7601 Service Pack 1

     

CPU:总共4个(每个CPU 2个核心,每个核心2个线程)系列6型号28   步进10,cmov,cx8,fxsr,mmx,sse,sse2,sse3,ssse3,ht

     

内存:4k页面,物理1037616k(107780k免费),交换   2086192k(357112k免费)

     

vm_info:用于windows-x86 JRE的Java HotSpot(TM)客户端VM(20.2-b06)   (1.6.0_27-b07),建于2011年7月19日01:04:42 by" java_re"与MS   VC ++ 7.1(VS2003)

     

时间:Sun Jun 17 12:41:45 2012经过时间:0秒

任何帮助都将不胜感激。

1 个答案:

答案 0 :(得分:0)

您是否尝试重新安装java(当然首先卸载)