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

前端 未结 19 1820

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

[2010-07-19 23:29:23 - myProject]
trouble processing \"javax/net/SocketFa         


        
相关标签:
19条回答
  • 2020-12-05 18:28

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

    0 讨论(0)
  • 2020-12-05 18:32

    I have done it as the instruction of the first answer and it works.(Linux) I think the problem may caused by SDK or ADT updates. I do have to clear all the lib in Java Building path and then use android tools to fix the project. After cleaning and rebuild, it works as before.

    0 讨论(0)
  • 2020-12-05 18:36

    Under certain conditions it gets its knickers in a twist and the best fix I've found is to remove referenced jars, clean, add them back in and then compile again.

    I believe the error can be caused by including the same classes twice.

    This error will also occur (and you won't be able to get rid of it by cleaning) when using classes that are not part of the Android environment.

    0 讨论(0)
  • 2020-12-05 18:37

    My problem was having a jar file in my src folder. Removing jars from the build path works, but only if you don't need the jar in question. For people who need the jar in question, make sure that your jar file is not in the project folder (maybe just src subtree, but I would keep it separate to test). Put it on your desktop or something and try the "Add external jar.." option. Be sure to remove the jar from the project filesystem before adding another external. Having both is what causes the problem.

    0 讨论(0)
  • 2020-12-05 18:39

    I had the same problem,and solved it as follows:

    1. First clean all jars; (This problem must because your some jars)
    2. Delete the project;
    3. Reimport project;
    4. Make sure your sdk is right, and project select one sdk version;
    5. (This is my issue to solve the problem) Right click your project, and select "build-path", next select "add Librarys", and add your private jars; clean-build, the problem has fixed;
    0 讨论(0)
  • 2020-12-05 18:39

    From what I understand, this same cryptic error could be caused from a wide variety of reasons. I've got "Conversion to Dalvik format failed with error 1" error too. In my case the problem was that for some reason Project -> Properties -> Java Compiler was not set to "Enable project specific settings" with proper Java 1.5 settings, but was left to defaults instead (1.6 in my case). Debug, build and test on devices/emulators worked fine, but export always failed with the above error message.

    If unsure about the proper settings, create the same project on some alternative location and just copy all needed files from the old project into the new one. This fixed the issue for me.

    The next problem with the same error message came from using proguard. Updating to the latest version by replacing the one that came with android sdk, fixed that.

    Hope this helps

    0 讨论(0)
提交回复
热议问题