经常遇到类似如下的错误:
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文件内容不正确。 简单的处理办法就是:选择一个正常编译的android工程,将该工程下的.classpath文件复制到出错的工程目录下,然后清除错误:project---client 指定错误的工程,重新编译即可成功。 也可以在出错工程目录下直接创建一个正确的.classpath文件,内容如下: <?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> |
|