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

前端 未结 19 1821

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:46

    This happened to me this way,

    I have a quite an old project which I had to start working again today. I use 'Universal Image Downloader' library for basically every project where I have to deal with lots of images. So in this old project I had the source files of 'Universal Image Downloader' included to it's 'src' path. Back then I was a newbie and slowly I started developing my own library which could handle every day simple Android development tasks very easily. Obviously I included the 'Universal Image Downloader' to this.

    After dusting off the old project today the first thing I did was to reference my library to speed up the development process but as I was trying to debug I ran into the "Conversion to Dalvik format failed with error 1" over and over again. First I thought it was the support library but even after clearing all libraries and adding only mine and doing a quick 'Fix project properties' I still got it. After trying various solutions I noticed this in the console "java.lang.IllegalArgumentException: already added: Lcom/nostra13/universalimageloader/cache/disc/BaseDiscCache;"

    It was as simple as that... I'm trying to compile a class which has already been compiled.

    Solution : I just simply removed all the class files I got from 'Universal Image Downloader' library from the 'src' directory. Since my library references "Universal Image Downloader" library the old project started working just fine.

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

    To summarise the information in the link bimbim.in provided (well my understanding when I glanced over it)

    • The Android Davik VM tries to compile the jars but finds some stuff that it can't compile to .dex files

    so

    • Just create a "lib" directory in the root of the project (where the src, bin res directories are) and add them to the build path. Project Properties... Java Build Path... Libraries.. Add JARs..
    0 讨论(0)
  • 2020-12-05 18:46

    I solved the problem by updating available packages in the Android SDK et AVD manager. No need to remove Eclipse.

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

    Whenever the Project is having the ambitious data. This problem is caused. May be android can't able to find which one choose.

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

    I was getting the same error. My problem was that i had an android device hooked up to debug with. As soon as I unplugged it I was able to export.

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

    Either:

    • javax.net.SocketLibrary is in your source code, or
    • javax.net.SocketLibrary is included in a JAR file in your project
    0 讨论(0)
提交回复
热议问题