Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/212.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 致命异常:升级到com.android后的IntentService[RegintService]。支持:support-v4:25.0.1_Java_Android_Android Studio_Google Cloud Messaging - Fatal编程技术网

Java 致命异常:升级到com.android后的IntentService[RegintService]。支持:support-v4:25.0.1

Java 致命异常:升级到com.android后的IntentService[RegintService]。支持:support-v4:25.0.1,java,android,android-studio,google-cloud-messaging,Java,Android,Android Studio,Google Cloud Messaging,我正在使用MacBookPro,Android Studio 2.2。我有最新的SDK。今天,我升级了我的应用程序的依赖项,如下所示(支持库以前是版本23): minSDK(15)没有变化,但targetSDK为25以匹配支持库。我清理了这个项目,重建了它。然后通过usb将其加载到android 4.1.1设备。这以前是可行的,但在更改后,它在启动时崩溃,并出现以下堆栈跟踪: W/dalvikvm: threadid=24: thread exiting with uncaught except

我正在使用MacBookPro,Android Studio 2.2。我有最新的SDK。今天,我升级了我的应用程序的依赖项,如下所示(支持库以前是版本23):

minSDK(15)没有变化,但targetSDK为25以匹配支持库。我清理了这个项目,重建了它。然后通过usb将其加载到android 4.1.1设备。这以前是可行的,但在更改后,它在启动时崩溃,并出现以下堆栈跟踪:

W/dalvikvm: threadid=24: thread exiting with uncaught exception (group=0x42075468)
E/AndroidRuntime: FATAL EXCEPTION: IntentService[RegIntentService]
                  java.lang.IllegalAccessError: tried to access method android.support.v4.content.ContextCompat.<init>:(Ljava/lang/String;)V from class com.google.android.gms.iid.zzd
                      at com.google.android.gms.iid.zzd.zzdL(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.moapy.eyeniaras.satdostum.RegistrationIntentService.onHandleIntent(RegistrationIntentService.java:54)
                      at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
                      at android.os.Handler.dispatchMessage(Handler.java:99)
                      at android.os.Looper.loop(Looper.java:155)
                      at android.os.HandlerThread.run(HandlerThread.java:60)
调试它时,我意识到如果没有这一行,应用程序将启动,但一旦通过该点,它就会停止。试图解决这个问题,但没有找到解决方案,谷歌搜索了这个问题,但没有找到任何有用的东西


感谢您的帮助

将Google Play Services更新至最新版本,将android支持库更新至最新版本。google play services的9.8版本和android支持库的25.0.1版本似乎都可以使用。

com.google.android.gms:play services:8.3.0
已经相当老了,如果它不能使用支持库的
25.0.1
,我也不会感到惊讶。如果要使用
25.0.1
,请转到更新的
播放服务(例如
10.0.0
)。此外,除非您使用的是每一个Play服务API,否则您可能会考虑使用比“代码>播放服务< /代码>更大的依赖性,加快您的构建并减小您的应用程序的大小。”清理、重建、无效缓存、重新启动。现在获取:错误:任务的执行失败“:app:ProcessDebuggGoogleServices”。>请通过更新google services插件的版本(有关最新版本的信息,请访问)或将com.google.android.gms的版本更新为8.3.0来修复版本冲突。我搜索了文本8.3.0,但它只存在于cache.xml中。我在其他任何地方使用8.3.0,为什么会有冲突?好吧,游戏服务多年来已经发生了变化,某些API现在使用插件。就我个人而言,我没有用过这些。这可以追溯到我之前的建议:去掉
播放服务
,并用您正在使用的特定API的特定依赖项(例如,
播放服务映射
)替换它。如果幸运的话,你正在使用的插件不需要这个插件。否则,添加插件。
W/dalvikvm: threadid=24: thread exiting with uncaught exception (group=0x42075468)
E/AndroidRuntime: FATAL EXCEPTION: IntentService[RegIntentService]
                  java.lang.IllegalAccessError: tried to access method android.support.v4.content.ContextCompat.<init>:(Ljava/lang/String;)V from class com.google.android.gms.iid.zzd
                      at com.google.android.gms.iid.zzd.zzdL(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.moapy.eyeniaras.satdostum.RegistrationIntentService.onHandleIntent(RegistrationIntentService.java:54)
                      at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
                      at android.os.Handler.dispatchMessage(Handler.java:99)
                      at android.os.Looper.loop(Looper.java:155)
                      at android.os.HandlerThread.run(HandlerThread.java:60)
InstanceID instanceID = InstanceID.getInstance(this);