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

标签 java android google-play-services android-support-library 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

最佳答案

请看这个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/

相关文章:

java - 用于第三方集成的两种方式密码加密

Android Canvas.drawPicture 不适用于带有 Ice Cream Sandwich 的设备

java - Android: Google play games services connection error (java.lang.IllegalStateException: GoogleApiClient must be connected.)

android - 如何使用 GoogleApiClient 为云端点客户端提供凭据

在 xml 中具有可绘制背景的 Android TextView 填充

android - Google Play 服务已过时。需要 4030500 但找到 3266132

Java:扫描仪运行时无法被识别

java - ASP.NET 页面调用 Java Applet 和字段失去焦点

java - 如何使用java在Cassandra 3.0中的集合文字内绑定(bind)变量?

c# - 是否可以调试 Xamarin.Android 绑定(bind)项目使用的 Android 库?