这是我第二次遇到这个错误,导致程序无法运行,两次均是在我导入外部jar包后发生的错误
2010-12-11 01:12:28 - myplayer]
trouble processing "java/net/DatagramPacket.class":
[2010-12-11 01:12:28 - myplayer]
Attempt to include a core class (java.* or javax.*) in something other
than a core library. It is likely that you have attempted to include
in an application the core library (or a part thereof) from a desktop
virtual machine. This will most assuredly not work. At a minimum, it
jeopardizes the compatibility of your app with future versions of the
platform. It is also often of questionable legality.
If you really intend to build a core library -- which is only
appropriate as part of creating a full virtual machine distribution,
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 be forewarned that your application will still fail
to build or run, at some point. Please be prepared for angry customers
who find, for example, that your application ceases to function once
they upgrade their operating system. You will be to blame for this
problem.
If you are legitimately using some code that happens to be in a core
package, then the easiest safe alternative you have is to repackage
that code. That is, move the classes in question into your own package
namespace. This means that they will never be in conflict with core
system classes. If you find that you cannot do this, then that is an
indication that the path you are on will ultimately lead to pain,
suffering, grief, and lamentation.
[2010-12-11 01:12:28 - myplayer]1 error; aborting
[2010-12-11 01:12:28 - myplayer]Conversion to Dalvik format failed with error 1
最后的解决办法 是 修改.classpath 文件
只要使 .classpath 文件 中的path属性值为正确的jar路径即可
红色部分为我引用的外部jar包 路径,保证这些路径正确且唯一即可
<?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="lib" path="lib/cpdetector_1.0.7.jar"/>
<classpathentry kind="lib" path="lib/antlr.jar"/>
<classpathentry kind="lib" path="lib/chardet.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
另外博客
http://fancyboy2050.iteye.com/blog/745059中介绍了 因为 sdk版本问题引发上述错误的解决办法,可以学习一下
分享到:
相关推荐
WinLicense uses a new and very advanced technology that detects any possible cracking attempt of an application and ensures each application is uniquely protected to avoid general attacks. ...
If you feel you need to send me a screen shot, please send it in GIF or PNG format. If you mail a bug report to me, please include the words "Drag Drop" in the subject of your email. --------------...
java.lang.NullPointerException: Attempt to invoke virtual method ‘void android.widget.ImageView.setImageResource(int)’ on a null object reference 今天在家练习ListView的时候,遇到一个java.lang....
This is a large book, and your class will probably cover only a portion of its material. We have tried, however, to make this a book that will be useful to you now as a course textbook and also later ...
we make no attempt to explain nonthread-related Java APIs). Though the material presented in this book does not assume any prior knowledge of threads, it does assume that the reader has knowledge of...
Rather than obscure the relevant LINQ principles in code examples by focusing on a demonstration application you have no interest in writing, this book cuts right to the chase of each LINQ operator, ...
Beginning iOS 6 Development Exploring the iOS SDK SourceCode
Android_4.1设计规范,相当有用的东西,值得学习参考!希望对你有点帮助!
"...a fascinating attempt to explain the fundamentals of MPEG-4 video technologies...highly recommended for broadcast engineers..." (EBU Technical Review, 2004) Product Description Following on from ...
【SpringBoot】Error: Could not find or load main class org.apache.hadoop.mapreduce.v2.app.MRAppMaster报错明细问题解决后记 报错明细 IDEA SpringBoot集成hadoop运行环境,,本地启动项目,GET请求接口触发...
There are a number of things that may prevent WP-Cumulus from displaying or cause it to display a short message about how it needs the Flash plugin. * In 99% of all cases where this happens the issue...
Unable to start activity ComponentInfo{com.applp.chunghop/com.applp.chunghop.activity.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String ...
An attempt at a C++ tutorial.
导入您的代码并创建新对象: var Attempt = require ( "attempt-js" ) ; var myAttempt = new Attempt ( /* ... */ ) ; // Note that 'new' is facultative! var myOtherAttempt = Attempt ( /* ... */ ) ; 在...
The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact. ...
A helper script to use with the i2c-stub kernel driver. Installed by default. * tools I2C device detection and register dump tools. These tools rely on the "i2c-dev" kernel driver. They are ...
06. A program or pc restart may be required to activate the license. 07. After installation run System Mechanic and: >At "Help" -> "Configure Update Options": uncheck "Automatically check for ...
Since the main purpose of this text is to teach electronics rather than simulation, the text does not attempt to teach the use of PSpice or any other simulation package. Most electronics programmes ...