Android SDK 1.5 "-core-library" build error Solution

Source: Internet
Author: User

If you manually configure the build path and add sdk1.5 Android. jar to some projects, you may encounter the following compilation error:

>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
>Compiling
>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.
>

 

This means that you want to apply a desktop VM class to Android applications, such as Java. AWT. *, java. Swing. *, and Java. Bean.

For available Android packages, see available packages on Android.

 

To solve this problem, you need to modify the. classpath file in the project directory and set the path to the following values:

<Classpathentry kind = "con"
Path = "com. Android. Ide. Eclipse. ADT. android_framework"/>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.