开发者社区> 问答> 正文

Android_Push_SDK初始化异常:java.lang.ExceptionInInitializerError:Caused by: java.lang.IllegalStateException: Fail to load ams-spi-services for com.alibaba.sdk.android.ams.common.spi.FactoryProvider

E/AndroidRuntime: FATAL EXCEPTION: main

                               Process: com.izhaowo.user, PID: 25163
                               java.lang.ExceptionInInitializerError
                                   at com.alibaba.sdk.android.ams.common.spi.ServiceFactoryFactory.getFactory(Unknown Source)
                                   at com.alibaba.sdk.android.ams.common.securitybox.SecurityBoxServiceFactory.getSecurityBoxService(Unknown Source)
                                   at com.alibaba.sdk.android.push.noonesdk.PushServiceFactory.init(Unknown Source)
                                   at com.izhaowo.user.App.initCloudChannel(App.java:85)
                                   at com.izhaowo.user.App.onCreate(App.java:49)
                                   at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:326)
                                   at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
                                   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4604)
                                   at android.app.ActivityThread.access$1500(ActivityThread.java:159)
                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
                                   at android.os.Handler.dispatchMessage(Handler.java:102)
                                   at android.os.Looper.loop(Looper.java:135)
                                   at android.app.ActivityThread.main(ActivityThread.java:5313)
                                   at java.lang.reflect.Method.invoke(Native Method)
                                   at java.lang.reflect.Method.invoke(Method.java:372)
                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1116)
                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:809)
                                Caused by: java.lang.IllegalStateException: Fail to load ams-spi-services for com.alibaba.sdk.android.ams.common.spi.FactoryProvider
                                   at com.alibaba.sdk.android.ams.common.spi.ServiceLoaderUtils.getServices(Unknown Source)
                                   at com.alibaba.sdk.android.ams.common.spi.LazyLoadProviderHolder.<clinit>(Unknown Source)
                                   at com.alibaba.sdk.android.ams.common.spi.ServiceFactoryFactory.getFactory(Unknown Source) 
                                   at com.alibaba.sdk.android.ams.common.securitybox.SecurityBoxServiceFactory.getSecurityBoxService(Unknown Source) 
                                   at com.alibaba.sdk.android.push.noonesdk.PushServiceFactory.init(Unknown Source) 
                                   at com.izhaowo.user.App.initCloudChannel(App.java:85) 
                                   at com.izhaowo.user.App.onCreate(App.java:49) 
                                   at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:326) 
                                   at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012) 
                                   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4604) 
                                   at android.app.ActivityThread.access$1500(ActivityThread.java:159) 
                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380) 
                                   at android.os.Handler.dispatchMessage(Handler.java:102) 
                                   at android.os.Looper.loop(Looper.java:135) 
                                   at android.app.ActivityThread.main(ActivityThread.java:5313) 
                                   at java.lang.reflect.Method.invoke(Native Method) 
                                   at java.lang.reflect.Method.invoke(Method.java:372) 
                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1116) 
                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:809) 
                                Caused by: java.io.FileNotFoundException: ams-spi-services/com.alibaba.sdk.android.ams.common.spi.FactoryProvider
                                   at android.content.res.AssetManager.openAsset(Native Method)
                                   at android.content.res.AssetManager.open(AssetManager.java:555)
                                   at android.content.res.AssetManager.open(AssetManager.java:529)
                                   at com.alibaba.sdk.android.ams.common.spi.ServiceLoaderUtils.getServices(Unknown Source) 
                                   at com.alibaba.sdk.android.ams.common.spi.LazyLoadProviderHolder.<clinit>(Unknown Source) 
                                   at com.alibaba.sdk.android.ams.common.spi.ServiceFactoryFactory.getFactory(Unknown Source) 
                                   at com.alibaba.sdk.android.ams.common.securitybox.SecurityBoxServiceFactory.getSecurityBoxService(Unknown Source) 
                                   at com.alibaba.sdk.android.push.noonesdk.PushServiceFactory.init(Unknown Source) 
                                   at com.izhaowo.user.App.initCloudChannel(App.java:85) 
                                   at com.izhaowo.user.App.onCreate(App.java:49) 
                                   at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:326) 
                                   at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012) 
                                   at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4604) 
                                   at android.app.ActivityThread.access$1500(ActivityThread.java:159) 
                                   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380) 
                                   at android.os.Handler.dispatchMessage(Handler.java:102) 
                                   at android.os.Looper.loop(Looper.java:135) 
                                   at android.app.ActivityThread.main(ActivityThread.java:5313) 
                                   at java.lang.reflect.Method.invoke(Native Method) 
                                   at java.lang.reflect.Method.invoke(Method.java:372) 
                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1116) 
                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:809) 

展开
收起
k8toledo 2016-07-06 17:07:15 8765 0
1 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
Spring Cloud Alibaba - 重新定义 Java Cloud-Native 立即下载
The Reactive Cloud Native Arch 立即下载
JAVA开发手册1.5.0 立即下载