android : Error converting byte to dex

后端 未结 30 1699
鱼传尺愫
鱼传尺愫 2020-12-01 10:25

So, I am getting the following error while running the project after upgrading build.gradle (Project) from

dependencies {
        classpath \'com.android.too         


        
相关标签:
30条回答
  • 2020-12-01 10:47

    Just restart your AS, then Rebuild your app!

    0 讨论(0)
  • 2020-12-01 10:47

    Try installing via :app:installDebug. If it works then it is related to Android Studio's caches. I removed .gradle/ folder inside my project and it works.

    0 讨论(0)
  • 2020-12-01 10:47

    I had the same problem and realised that the two separate jar files I had in my app/libs folder had the same packages as sub dependencies, which caused the conflict.

    0 讨论(0)
  • 2020-12-01 10:49

    I met the same problem,and i clean project ,some other problems causeed can not clean,so i manually delete dir 'build' ,so it can can clean Ok,then run it ok for me.

    0 讨论(0)
  • 2020-12-01 10:49

    This question have many answers but, if you not solved your error yet, this could work:

    Sometimes we import different versions from google products/APIs so, try to organize your gradle file to solve the: Mixing versions warning

    0 讨论(0)
  • 2020-12-01 10:50

    After I upgraded to Android Studio 2.1, the next time I rebooted, I was asked to upgrade to JDK 1.8. After I upgraded to JDK 1.8, that's when my AS project had trouble compiling. I followed all of the suggestions in this page, but to no avail. Finally, I decided to check the version of JDK that my project was using, and to my surprise, it somehow was pointing to JDK 1.8!

    Moral of the story: If compileSdkVersion<=23, double check that your project is using JDK1.7 as follows:

    • Right Mouse on top level module
    • Project STructure => JDK Location
    0 讨论(0)
提交回复
热议问题