将播放服务更新到版本 8.1.0 或 8.3.0 后无法创建发布 APK 我收到以下异常。
任何人都知道如何解决这个问题。
Uncaught translation error: com.android.dx.cf.code.SimException: com.android.dx.rop.cst.CstMethodRef cannot be cast to com.android.dx.rop.cst.CstInterfaceMethodRef
Uncaught translation error: com.android.dx.cf.code.SimException: com.android.dx.rop.cst.CstMethodRef cannot be cast to com.android.dx.rop.cst.CstInterfaceMethodRef
2 errors; aborting
Error:Execution failed for task ':project:dexRelease'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_66\bin\java.exe'' finished with non-zero exit value 1
最佳答案
请看这个Android issue .
这是一个已知错误。官方的解决方法是:
The development team has fixed the issue that you have reported and it will be available in a future build.
Workaround for time being: Right the issue is that you need to put the useLibrary element if you need to compile against it. But if you don't compile your code against it but you have 3rd party libs that use it and you run through proguard (Which is picky about wanting to see all the classes that are used), then we need to pass it to proguard whether you ask for it for compiling or not.
The short term work-around is to ask for the library for compiling (which will then also add it to the classpath that we give to proguard).
这基本上意味着您应该使用最新的 Google Play 服务重新编译所有库(包括第三方库),或者恢复到较旧的 Google Play 服务版本。
关于java - 将播放服务更新到 8.3.0 后无法创建发布版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33734347/