0

I have a problem running my android project through eclipse. It gives following error when I try to run it:

trouble processing "javax/net/SocketFactory.class": ... Conversion to Dalvik format failed with error 1

I am using Android 2.3.1 API level 9. The android.jar that is downloaded from AVD Manager has the javax/net package inside it.

I have searched on this issue and it seems to be the issue related to conversion of classes into Dalvik. But "javax/net/SocketFactory.class" is part of the android.jar. Any suggestions ?

asked Mar 7, 2012 at 14:52
4
  • have you seen this one? stackoverflow.com/questions/3284407/… Commented Mar 7, 2012 at 14:58
  • yes i have used that one. Doing this also removes a third party library that i am using to process json. I have to add that library again so that it doesn't give compile time errors. Running after clean/build gives the same error. Commented Mar 7, 2012 at 15:09
  • The problem is resolved. I was mistakenly adding two android libraries at a time. One is added by default and other is added via Maven dependency. Removing the android dependency from pom.xml works. But now it is not working on terminal through mvn install command. This is a separate issue now. Commented Mar 7, 2012 at 15:32
  • Oops, did not notice that you solved the issue. Please feel free to ignore my answer. Commented Mar 7, 2012 at 15:34

2 Answers 2

1

The problem is resolved. I was mistakenly adding two android libraries at a time. One is added by default and other is added via Maven dependency. Removing the android dependency from pom.xml works. But now it is not working on terminal through mvn install command. This is a separate issue now.

answered Mar 9, 2012 at 8:47
Sign up to request clarification or add additional context in comments.

Comments

0

As you know android sdk comes complete with java sdk build in. This sdk is light weight and customized for use by the dalvik engine. Now, if we also add java jar’s along with the android app, obviously the android system will have trouble converting that java jar to dalvik. Hence the "conversion to dalvik" issue.

So now that you know what happens, lets figure out why it happens.

In my case it was the barcode, zxing framework that caused the problem. You have to find out what is causing the issue in your setup.

answered Mar 7, 2012 at 15:33

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.