我刚刚下载了 Indoor Atlas SDK 并尝试运行。我设法修复了各种小错误,但现在卡住了。该应用程序安装(通过模拟器和 Galaxy 标签),但都给了我同样的错误:
E/AndroidRuntime﹕ FATAL EXCEPTION: IdaSensorReadingManager
Process: xxxx.indooratlas, PID: 1632
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.hardware.Sensor.getType()' on a null object reference
at com.indooratlas._internal.ai.a(Unknown Source)
at com.indooratlas._internal.ai.b(Unknown Source)
at com.indooratlas._internal.ai$a.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
这个标准的 Android 错误或 Indoor Atlas 是特定的吗?
SDK 版本:indooratlas-android-sdk-release-1.3.1-108 在 Android 4.4 和 5.0 上测试
03-16 16:21:17.971 11646-11646/com.example.indooratlas E/SELinux﹕ [DEBUG] seapp_context_lookup: seinfoCategory = default
03-16 16:21:17.971 11646-11646/com.example.indooratlas D/dalvikvm﹕ Late-enabling CheckJNI
03-16 16:21:17.971 11646-11646/com.example.indooratlas D/dalvikvm﹕ Try to disable coredump for pid 11646
03-16 16:21:17.971 11646-11646/com.example.indooratlas D/dalvikvm﹕ Process 11646 nice name: com.example.indooratlas
03-16 16:21:17.971 11646-11646/com.example.indooratlas D/dalvikvm﹕ Extra Options: not specified
03-16 16:21:18.101 11646-11646/com.example.indooratlas D/dalvikvm﹕ GC_FOR_ALLOC freed 913K, 28% free 4868K/6704K, paused 3ms, total 3ms
03-16 16:21:18.111 11646-11646/com.example.indooratlas D/dalvikvm﹕ GC_FOR_ALLOC freed 824K, 29% free 4907K/6816K, paused 2ms, total 3ms
03-16 16:21:18.111 11646-11646/com.example.indooratlas D/dalvikvm﹕ GC_FOR_ALLOC freed 874K, 29% free 4913K/6848K, paused 3ms, total 3ms
03-16 16:21:18.231 11646-11646/com.example.indooratlas D/dalvikvm﹕ GC_FOR_ALLOC freed 675K, 27% free 5051K/6848K, paused 4ms, total 4ms
03-16 16:21:18.261 11646-11646/com.example.indooratlas D/AbsListView﹕ Get MotionRecognitionManager
03-16 16:21:18.291 11646-11646/com.example.indooratlas D/MainActivity﹕ Connecting with IndoorAtlas, apiKey: my-api-ley
03-16 16:21:18.321 11646-11646/com.example.indooratlas I/dalvikvm﹕ Failed resolving Lcom/indooratlas/_internal/bg$b; interface 150 'Landroid/net/ConnectivityManager$OnNetworkActiveListener;'
03-16 16:21:18.321 11646-11646/com.example.indooratlas W/dalvikvm﹕ Link of class 'Lcom/indooratlas/_internal/bg$b;' failed
03-16 16:21:18.321 11646-11646/com.example.indooratlas E/dalvikvm﹕ Could not find class 'com.indooratlas._internal.bg$b', referenced from method com.indooratlas._internal.bg.b
03-16 16:21:18.321 11646-11646/com.example.indooratlas W/dalvikvm﹕ VFY: unable to resolve new-instance 1515 (Lcom/indooratlas/_internal/bg$b;) in Lcom/indooratlas/_internal/bg;
03-16 16:21:18.321 11646-11646/com.example.indooratlas D/dalvikvm﹕ VFY: replacing opcode 0x22 at 0x000c
03-16 16:21:18.321 11646-11646/com.example.indooratlas I/dalvikvm﹕ Failed resolving Lcom/indooratlas/_internal/bg$b; interface 150 'Landroid/net/ConnectivityManager$OnNetworkActiveListener;'
03-16 16:21:18.321 11646-11646/com.example.indooratlas W/dalvikvm﹕ Link of class 'Lcom/indooratlas/_internal/bg$b;' failed
03-16 16:21:18.321 11646-11646/com.example.indooratlas D/dalvikvm﹕ DexOpt: unable to opt direct call 0x2fe9 at 0x0e in Lcom/indooratlas/_internal/bg;.b
03-16 16:21:18.421 11646-11662/com.example.indooratlas D/dalvikvm﹕ Trying to load lib /data/data/com.example.indooratlas/files/assetlib.so 0x438b36a0
03-16 16:21:18.471 11646-11662/com.example.indooratlas D/houdini﹕ [11662] Loading library(version: 4.0.8.45720 RELEASE)... successfully.
03-16 16:21:18.521 11646-11662/com.example.indooratlas D/dalvikvm﹕ Added shared lib /data/data/com.example.indooratlas/files/assetlib.so 0x438b36a0
03-16 16:21:18.561 11646-11646/com.example.indooratlas D/MainActivity﹕ IndoorAtlas instance created
03-16 16:21:18.571 11646-11662/com.example.indooratlas I/SensorManagerA﹕ getReportingMode :: sensor.mType = 1
03-16 16:21:18.581 11646-11662/com.example.indooratlas D/SensorManager﹕ registerListener :: 1, K2DH Acceleration Sensor, 33333, 0,
03-16 16:21:18.581 11646-11662/com.example.indooratlas W/dalvikvm﹕ threadid=11: thread exiting with uncaught exception (group=0x433111a0)
03-16 16:21:18.581 11646-11662/com.example.indooratlas E/AndroidRuntime﹕ FATAL EXCEPTION: IdaSensorReadingManager
Process: com.example.indooratlas, PID: 11646
java.lang.NullPointerException
at com.indooratlas._internal.ai.a(Unknown Source)
at com.indooratlas._internal.ai.b(Unknown Source)
at com.indooratlas._internal.ai$a.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:146)
at android.os.HandlerThread.run(HandlerThread.java:61)
03-16 16:21:18.911 11646-11646/com.example.indooratlas E/IMGSRV﹕ :0: PVRDRMOpen: TP3, ret = 66
03-16 16:21:18.921 11646-11646/com.example.indooratlas E/IMGSRV﹕ :0: PVRDRMOpen: TP3, ret = 70
03-16 16:21:18.921 11646-11646/com.example.indooratlas E/IMGSRV﹕ :0: PVRDRMOpen: TP3, ret = 71
03-16 16:21:18.931 11646-11646/com.example.indooratlas E/IMGSRV﹕ :0: PVRDRMOpen: TP3, ret = 71
03-16 16:21:18.931 11646-11646/com.example.indooratlas E/IMGSRV﹕ :0: PVRDRMOpen: TP3, ret = 71
03-16 16:21:18.931 11646-11646/com.example.indooratlas E/IMGSRV﹕ :0: PVRDRMOpen: TP3, ret = 73
03-16 16:21:18.961 11646-11646/com.example.indooratlas D/OpenGLRenderer﹕ Enabling debug mode 0
03-16 16:21:22.171 11646-11646/com.example.indooratlas D/AbsListView﹕ onDetachedFromWindow
谢谢