开发者社区> 问答> 正文

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 8820 0
1 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
58同城Android客户端Walle框架演进与实践之路 立即下载
Android组件化实现 立即下载
蚂蚁聚宝Android秒级编译——Freeline 立即下载