NoClassDefFoundError使用Google电子钱包和新的Google Play服务6.5.87

时间:2014-12-09 18:01:28

标签: google-play-services android-pay

更新后使用新的模块化Google Play服务时,尝试运行我的应用时出现以下错误。

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/R$style;
            at com.google.android.gms.wallet.fragment.WalletFragmentStyle.ab(Unknown Source)
            at com.google.android.gms.wallet.fragment.WalletFragmentOptions.ab(Unknown Source)
            at com.google.android.gms.wallet.fragment.SupportWalletFragment.onCreate(Unknown Source)

这是我的gradle依赖

compile "com.google.android.gms:play-services-wallet:6.5.87"

当Google电子钱包在com.google.android.gms.wallet.R.style中生成样式类时,它似乎试图引用com.google.android.gms.R.style。有没有办法解决这个问题而不更新Play Services SDK?

1 个答案:

答案 0 :(得分:0)

“与mavenCentral无关,您需要确保为”Google Repository“和”Google Play服务“安装了最新的SDK包

这已在这里得到解答:answered by Sam Dozor

我累了,效果很好!