經(jīng)常遇到類似如下的錯誤:
Attempt to include a core VM class in something other than a core library.
It is likely that you have attempted to include the core library from a desktop
virtual machine into an application, which will most assuredly not work. If
you really intend to build a core library -- which is only appropriate as
part of creating a full virtual machine binary, as opposed to compiling an
application -- then use the "--core-library" option to suppress this error
message. If you go ahead and use "--core-library" but are in fact building
an application, then please be aware that your build will still fail at some
point; you will simply be denied the pleasure of reading this helpful error
message.
[2010-09-16 19:50:36 - WebViewDemo] 1 error; aborting
[2010-09-16 19:50:36 - WebViewDemo] Conversion to Dalvik format failed with error 1
出錯原因是工程目錄下的.classpath文件內(nèi)容不正確。
簡單的處理辦法就是:選擇一個正常編譯的android工程,將該工程下的.classpath文件復制到出錯的工程目錄下,然后清除錯誤:project---client 指定錯誤的工程,重新編譯即可成功。
也可以在出錯工程目錄下直接創(chuàng)建一個正確的.classpath文件,內(nèi)容如下:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="output" path="bin"/>
</classpath>