将播放服务更新到8.3.0后无法创建发布版本

alp*_*nso 7 java android android-support-library google-play-services android-6.0-marshmallow

在将播放服务更新到版本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
Run Code Online (Sandbox Code Playgroud)

Cod*_*odo 4

请参阅此Android 问题

这是一个已知的错误。官方给出的解决方法是:

开发团队已修复您报告的问题,并将在未来的版本中提供。

暂时的解决方法:正确的问题是,如果需要对其进行编译,则需要放置 useLibrary 元素。但是如果你没有针对它编译你的代码,但你有使用它的第 3 方库,并且你通过 proguard 运行(对于想要查看所有使用的类很挑剔),那么我们需要传递它来 proguard 是否你要求它编译或不编译。

短期解决方法是请求库进行编译(然后它也会将其添加到我们提供给 proguard 的类路径中)。

这基本上意味着您应该使用最新的 Google Play 服务重新编译所有库(包括第三方库),或者恢复到较旧的 Google Play 服务版本。