android工程导入,手机程序出现异常咋办问题咋办,急求

为什么android工程不能导入jdk的某些jar包,有什么方法解决吗?
[问题点数:40分]
为什么android工程不能导入jdk的某些jar包,有什么方法解决吗?
[问题点数:40分]
不显示删除回复
显示所有回复
显示星级回复
显示得分回复
只显示楼主
2010年12月 多媒体/设计/Flash/Silverlight 开发大版内专家分月排行榜第二
2011年4月 多媒体/设计/Flash/Silverlight 开发大版内专家分月排行榜第三2011年3月 多媒体/设计/Flash/Silverlight 开发大版内专家分月排行榜第三2010年11月 多媒体/设计/Flash/Silverlight 开发大版内专家分月排行榜第三2010年10月 多媒体/设计/Flash/Silverlight 开发大版内专家分月排行榜第三
匿名用户不能发表回复!|eclipse导入android工程后不能运行,工程本身没有错误。。。 这是乍回事啊。。。_百度知道
eclipse导入android工程后不能运行,工程本身没有错误。。。 这是乍回事啊。。。
我有更好的答案
baidu.baidu.com/zhidao/wh%3D600%2C800/sign=13aa3eb79add946f68bd7/f31fbe096b63fe18744ebf81b4ca3ff.jpg" esrc="http://e.hiphotos://e.jpg" target="_blank" title="点击查看大图" class="ikqb_img_alink">按提示操作就好。右击此工程--&android&tools--&fix&nbsp<a href="http
望高手指导。。。。thank you!
难道是我没有说清楚?右击出错的工程,然后选择Android Tools下面的Fix Project Properties。有图啊,应该看得懂才对。
采纳率:62%
来自团队:
码里有错的地方,比如重写函数需要加 @overwrite这种,还有可能是你的代码需要用到一些资源文件,而你导入工程的目录下没有,或者是你的代码需要用到一些库文件,你的Eclipse里没有,这个得具体问题具体分析,看具体出错的地方,有可能是你要载入的代码版本比较早和你的Eclipse版本比较新,有些地方的表示方法不一样
你的虚拟SDK卡呢,我勒个去。。
这个是需要安卓sdk支持的吧必须要有安卓的环境才可以
为您推荐:
其他类似问题
android的相关知识
&#xe675;换一换
回答问题,赢新手礼包&#xe6b9;
个人、企业类
违法有害信息,请在下方选择后提交
色情、暴力
我们会通过消息、邮箱等方式尽快将举报结果通知您。他的最新文章
他的热门文章
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)Eclipse&导入Android工程失败&问题及解决方案汇总
问题1:导入旧工程失败
描述:File→New→Project→Android Project from Existing Code,然后报错:Invalid
project description.
解决方案1:将旧工程的路径改为非workspace的路径,然后选择File→New→Project→Android Project
from Existing Code,在导入时,勾选Copy projects into workspace选项
解决方案2:File→New→Android Application
Project,建立新的工程,然后删除新工程目录下所有的文件,将旧项目文件拷入,并刷新工程
问题2:AndroidManifest.xml编译不通过
描述:Android Manifest报错
解决方案:
1.检查AndroidManifest.xml,看看是不是存在版本问题:可建立一个新项目,比比新的AndroidManifest.xml在格式上与旧版的有什么区别,修改一下
2.如果在问题1中使用了第二种解决方案,检查AndroidManifest.xml中minSdkVersion和targetSdkVersion与新建项目时选择的有什么出入;然后如果没有解决问题,右键→Properties→Android(或者用文本编辑器打开project.properties),检查target与新建项目时选择的有什么出入
问题3:其他源代码编译不通过
描述:The type java.lang.Object cannot be resolved. It is indirectly
referenced from required .class files
解决方案:
1.右键→Build Path→Configure Build Path,检查有没有存在问题的Library
2.在Library标签中Remove掉“Unable to get system library for the
project”或其他有问题的Library
3.如果不存在android.jar,加入对应版本的android.jar(Add Librar→Android Classpath
Container或去安装路径下找android-sdk/platforms/android-X/android.jar并加入)
问题4:没有编译错误,但是运行时说有错
[ 11:26:25 - eMenuForPhone] Dx trouble processing
"javax/net/ServerSocketFactory.class":
Ill-advised or mistaken usage of a core class (java.* or
javax.*) when not building a core library.
This is often due to inadvertently including a core library file
in your application's project, when using an IDE (such as Eclipse).
If you are sure you're not intentionally defining a
core class, then this is the most likely explanation of what's
However, you might actually be trying to define a class in a
core namespace, the source of which you may have taken, for
example, from a non-Android virtual machine project. This will
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
your own package namespace. This means that they will never be in
conflict with core system classes. JarJar is a tool that may help
you in this endeavor. 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.
[ 11:26:25 - eMenuForPhone] Dx 1 aborting
[ 11:26:25 - eMenuForPhone] Conversion to Dalvik format
failed with error 1
解决方案:
其实质是相同的android.jar或其他包多于一个,删除多余的包使其就剩一个即可,可重做问题3解决方案中的步骤,检查是否多添加了android.jar
已投稿到:
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。他的最新文章
他的热门文章
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)

我要回帖

更多关于 网络机盒出现黑平咋办 的文章

 

随机推荐