tags:

views:

628

answers:

6

Hello everyone!

Encounter this problem when trying to Build Project getting such output in console:

[2010-07-19 23:29:23 - myProject]
trouble processing "javax/net/SocketFactory.class":
[2010-07-19 23:29:23 - myProject] 
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-07-19 23:29:23 - myProject] 1 error; aborting
[2010-07-19 23:29:23 - myProject] Conversion to Dalvik format failed with error 1

I was looking for my project to use the package javax, not found, clean all also does not help. what I am doing wrong?

A: 

Either:

  • javax.net.SocketLibrary is in your source code, or
  • javax.net.SocketLibrary is included in a JAR file in your project
CommonsWare
A: 

Hi even i am facing the same problem. any solution??????. This javax.net.SocketLibrary is included in JAR file in my project.

hi Arkaha whether u have solved this issue???

pls help me insolving this issue

Jeevamohan
A: 

Hi again, - I solved the problem (at least for me).

Here's what I did:

  • Go to Project » Properties » Java Build Path » Libraries
  • Remove all except the "Android X.Y" click OK.
  • Go to Project » Clean » Clean projects selected below » select your project and click OK.

That did the trick for me. Hope it works for you as well

Update: well actually I might have to retract my opinion.. the actions removed the error messages but now I am missing certain classes and methods... arggghhhh

Spock
A: 

Hi,

Hit same problem shown on your log when trying to run an example project which was imported into eclipse.

Additional Info: in eclipse's Problems View I see the following error:

"The project cannot be built until build path errors are resolved"

In my case the imported project find the libraries just right(by just right I mean I can see the external path to each of the android libs in this case 2 libs, android.jar and maps.jar). So no shuffling of libs in my case, but might be your problem.

I followed Spock's suggestion of cleaning the project which I had to clean multiple times until it somehow resolve its issues. After, issue was solved I had to specify an AVD for the project to run and soon after was up and running on the emulator. Also, note that my eclipse is set up to Build Automatically.

In my case I'm not missing any class files or anything after the clean as the build is properly generating them.

Regards!

Juan Correa
A: 

To solve this Dalvik format conevrsion error please read this article I hope this will help you to understand and resolve this. http://bimbim.in/post/2010/09/24/Reason-of-Conversion-to-dalvik-format-failed-with-error-1.aspx

bimbim.in
A: 

I just had the same problem and I tried all of the solutions listed here with no success (I was starting to get annoyed). Then I removed the project from the workspace and then imported it again, and there were no problems!

stealthcopter