Android SDK 1.5-core-library build error问题解决方法  -  棒槌网@Android开发论坛 - Powere

本文解决在Android开发过程中遇到的将桌面虚拟机类(如java.awt.*,java.swing.*)用于应用程序时引发的编译错误。通过修改.class path文件并设置特定路径,可以解决此问题。此外,提供了关于Android SDK、安装与配置、开发论坛链接及推荐文章的额外资源。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

如果你手工配置build path,把sdk1.5的android.jar加入到某些工程中,你可能会遇到下面的编译错误:


> 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
> build ing
> 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.
>

这意味着你想把一个桌面vm中的类运用到android 应用程序中,比如java.awt.*, java.swing.*, java.bean等。

可用android 包参见:available packages on android ,这肯定是不行的。

为了解决这个问题,需要修改工程目录下的.class path文件,把其中的path设置成下面的值即可:

<classpathentry kind="con"
path="com.android.ide.eclipse.adt.android_framework"/>
转自http://dev.10086.cn/cmdn/wiki/index.php?doc-view-3157.html
android开发论坛
棒槌网@Android相关文章推荐:
Android SDK 1.5 --core-library build error问题解决方法
ubuntu9.04上android sdk 1.5 安装与配置13320100271
Android 1.5 SDK与SDK开发教程- aikerlee的专栏-
Android 特刊 第一期 Andriod 1.5 SDK简介
android Unknown error: SDK is not loaded yet解决方法
android sdk source 1.5 至 2.2 下载
android 1.5 和 2.0 SDK的源代码

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值