Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Conversion to Dalvik format failed with error 1 with javax/net/SocketFactory.class

Tags:

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?

Update

Sorry guys, but I could not find good fix for that, I want to emphasize the fact, that i dont use SocketFactory class in my project at all! source code was not changed before this problem, and that's why i think that problem in eclipse or adt or something else, BUT if i use ant(generated by sdk) to build this project there is no problem!!!

I solve this problem by removing Eclipse, Android SDK, Eclipse workspace, and just reinstall them, after this all works fine for now.

Hope this will help someone.

like image 369
Arkaha Avatar asked Jul 19 '10 19:07

Arkaha


2 Answers

I had the same problem.. This worked for me project-->properties->java build path->libraries-> remove all including android jars

now go the project browser, right click on the project you are working on, then android tools---> fix project properties... do a clean and then build...

like image 162
prash Avatar answered Sep 23 '22 00:09

prash


  • 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

like image 33
Spock Avatar answered Sep 24 '22 00:09

Spock