当我“构建APK”时,我收到“重复输入”错误。
当我在模拟器或实际设备上构建和运行它时,这很好。当我去构建一个APK上传时,它失败了。
Stackoverflow上有很多类似的问题,其中大部分都指出支持-v4是罪魁祸首......并且错误也将其解释出来。我试过消除所有这些都无济于事。任何帮助表示赞赏。
这是错误:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v4/widget/CompoundButtonCompatLollipop.class
这是我的应用程序的Gradle.build。我把它放在一个要点,以使其更具可读性。
https://gist.github.com/crowell256aa/eb38857b76bee88c8d66782d8fcf83b8