1

こんにちは、私はこのリンクを使用していますが、Android 3.0 では動作しませんが、2.0 と 2.2 では動作します

http://console.xtify.com/implementation-guide-android

エラーは次のとおりです。

05-16 16:21:41.132: ERROR/AndroidRuntime(3583): java.lang.RuntimeException: Unable to create service com.xtify.android.sdk.MainService: java.lang.IllegalArgumentException: provider=network
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at android.app.ActivityThread.handleCreateService(ActivityThread.java:2034)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at android.app.ActivityThread.access$2500(ActivityThread.java:123)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1047)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at android.os.Handler.dispatchMessage(Handler.java:99)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at android.os.Looper.loop(Looper.java:126)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at android.app.ActivityThread.main(ActivityThread.java:3997)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at java.lang.reflect.Method.invokeNative(Native Method)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at java.lang.reflect.Method.invoke(Method.java:491)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at dalvik.system.NativeStart.main(Native Method)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583): Caused by: java.lang.IllegalArgumentException: provider=network
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at android.os.Parcel.readException(Parcel.java:1326)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at android.os.Parcel.readException(Parcel.java:1276)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at android.location.ILocationManager$Stub$Proxy.requestLocationUpdates(ILocationManager.java:646)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at android.location.LocationManager._requestLocationUpdates(LocationManager.java:582)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at android.location.LocationManager.requestLocationUpdates(LocationManager.java:446)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at com.xtify.android.sdk.MainService.g(Unknown Source)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at com.xtify.android.sdk.MainService.onCreate(Unknown Source)
05-16 16:21:41.132: ERROR/AndroidRuntime(3583):     at android.app.ActivityThread.handleCreateService(ActivityThread.java:2024)
4

1 に答える 1

0

以下のコードを使用してください:

if (Build.VERSION.SDK_INT >= 8){
    registerForC2dm();
} else {
    // continue to use your pre-C2DM solution here for ex. MQTT library
}
于 2011-08-08T10:38:58.933 に答える