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-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文

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

k8toledo 2016-07-06 17:07:15 7062

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) 
分享到
取消 提交回答
云计算
使用钉钉扫一扫加入圈子
+ 订阅

时时分享云计算技术内容,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。

推荐文章