久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

更新到 Android Build Tools 25.1.6 GCM/FCM 后出現 Incomp

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現 IncompatibleClassChangeError)
本文介紹了更新到 Android Build Tools 25.1.6 GCM/FCM 后出現 IncompatibleClassChangeError的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

自從我更新到 Android SDK Tools 25.1.6 和 Android Support Repository 32.0.0(今天早上)后,我收到了以下錯誤,我沒有更改我的代碼中的任何內容,它仍在我同事的計算機上運行(Android SDK 工具 25.1.1 + Android 支持存儲庫 30.0.0).

Since I updated to Android SDK Tools 25.1.6 and Android Support Repository 32.0.0 (this morning), I got the following error, I didn't change anything in my code and it is still working on my colleague computer (Android SDK Tools 25.1.1 + Android Support Repository 30.0.0).

java.lang.IncompatibleClassChangeError: The method 
     'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' 
     was expected to be of type virtual but instead was found to be of type direct 
     (declaration of 'java.lang.reflect.ArtMethod' appears in /system/framework/core-libart.jar)

     at com.google.android.gms.iid.zzd.zzeb(Unknown Source)
     at com.google.android.gms.iid.zzd.<init>(Unknown Source)
     at com.google.android.gms.iid.zzd.<init>(Unknown Source)
     at com.google.android.gms.iid.InstanceID.zza(Unknown Source)
     at com.google.android.gms.iid.InstanceID.getInstance(Unknown Source)
     at com.xxxxxxx.utils.RegistrationIntentService.onHandleIntent(RegistrationIntentService.java:55)
     at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
     at android.os.Handler.dispatchMessage(Handler.java:102)
     at android.os.Looper.loop(Looper.java:145)
     at android.os.HandlerThread.run(HandlerThread.java:61)

這是一段崩潰的代碼:

InstanceID instanceID = InstanceID.getInstance(this); // <-- crash here
String instanceIDToken = instanceID.getToken(getString(R.string.google_app_id),
GoogleCloudMessaging.INSTANCE_ID_SCOPE, null);

當我嘗試從 Google Cloud Messaging 獲取令牌時.

It is when I try to get a token from Google Cloud Messaging.

我正在使用拆分播放服務在 Gradle 中導入 GCM:

I'm importing GCM in Gradle with splited play-services :

 compile 'com.google.android.gms:play-services-analytics:9.0.0' 
 compile 'com.google.android.gms:play-services-maps:9.0.0'
 compile 'com.google.android.gms:play-services-location:9.0.0' 
 compile 'com.google.android.gms:play-services-gcm:9.0.0' 
 compile 'com.google.android.gms:play-services-base:9.0.0'

編輯禁用 GCM 解決了這個問題,所以我猜我應該遷移到 Firebase Cloud Message

EDIT disabling GCM fixed the problem, so my guess is I should migrate to Firebase Cloud Message

EDIT2我的設備接收 Google Play Services 9.0(昨天是 8.4.x).現在它不再崩潰了,但是抱怨模塊描述符

EDIT2 My device receive Google Play Services 9.0 (yesterday was 8.4.x). Now it doesn't crash anymore, but complain about module descriptor

 Failed to load module descriptor class: Didn't find class "com.google.android.gms.dynamite.descriptors.com.google.firebase.auth.ModuleDescriptor"
 Firebase API initialization failure.

有沒有人遇到過類似的錯誤,如何解決?

Does anyone has a similar error, and how to fix it ?

已修復特別感謝@stegranet../gradlew -q app:dependencies --configuration compile 幫助您識別 SDK 24.x 包含哪些依賴項

FIXED special thanks to @stegranet. ./gradlew -q app:dependencies --configuration compile helps you to identify what dependencies include SDK 24.x

主要問題是某些庫使用 + 符號而不是版本導入最新的支持庫.這會導致問題,包括最新的可用版本.

Main issue is some library import the latest support library using + sign instead of a version. This cause the issue, by including the latest available version.

所以避免 + 登錄依賴 ;)

So avoid + sign in dependencies ;)

推薦答案

我使用gradle依賴樹為我解決了這個錯誤.

I used the gradle dependency tree to solve this error for me.

只需運行 gradle -q app:dependencies --configuration compile并檢查輸出是否有這樣的條目:

Just run gradle -q app:dependencies --configuration compile and check the output for entries like this:

+--- com.mcxiaoke.viewpagerindicator:library:2.4.1
|    --- com.android.support:support-v4:+ -> 24.0.0-beta1 (*)

正如 Diego Giorgini 所說,這個版本太高了 (>=24).所以像

As Diego Giorgini said this version is too high (>=24). So update the dependencies in build.gradle like

compile('com.mcxiaoke.viewpagerindicator:library:2.4.1') {
    exclude module: 'support-v4';
}
compile 'com.android.support:support-v4:23.4.0'

這篇關于更新到 Android Build Tools 25.1.6 GCM/FCM 后出現 IncompatibleClassChangeError的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How to get current flavor in gradle(如何在 gradle 中獲取當前風味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復“意外元素lt;查詢gt;在“清單中找到錯誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風味庫的多風味應用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運行時有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
Why I#39;m Getting Duplicate Class When Running My Android Project(為什么我在運行我的 Android 項目時得到重復的類)
主站蜘蛛池模板: 亚洲欧美综合 | 久久精品久久久精品美女 | 免费在线观看www | 深夜福利网站 | 九九视频在线免费观看 | 特大黑人巨交吊性xxxx视频 | 中国女人真人一级毛片 | 九九视频在线免费观看 | 久久午夜影院 | 亚洲国产欧美日韩在线 | 日本韩国三级 | 日韩欧美一区二区在线观看 | 精品久久精品 | 天天爽天天 | 国产一区在线播放 | 久久精品网 | 免费观看a级片 | 国产探花在线精品一区二区 | 成人免费毛片片v | 天天躁日日躁狠狠躁av麻豆男男 | 日本aaaa| 免费精品视频 | 国产精品一区二区三区四区五区 | 97在线观看视频 | 97在线视频免费观看 | 日本va欧美va欧美va精品 | 亚洲在线免费视频 | 久久久精品一区 | 午夜精品在线 | 亚洲高清毛片一区二区 | 久久狠狠干| 天天搞天天搞 | 欧美不卡在线 | 成人精品福利 | 久久国产精品一区二区 | 91久久久久久久 | 色综合视频在线观看 | 99一区二区三区 | 一级黄色大片 | 亚洲毛片网 | 黄网站视频 |