0

我刚刚下载了 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

谢谢

4

2 回答 2

0

您目前(版本 1.3.1)无法使用模拟器运行 IndoorAtlas 的 Android SDK。IndoorAtlas 的技术主要基于磁定位(即使用磁场传感器并融合其他传感器)。您也许可以运行 SDK,但除非您设法在模拟器中模拟这些传感器,否则您不会走得太远,因为您不会获得任何位置。查看 IndoorAtlas 服务的主要功能:https ://www.indooratlas.com/features 。有一些模拟传感器的项目,例如:https ://code.google.com/p/android-sensor-emulation/- 但如果可能,我建议使用真实设备。请注意,为了进行完整的定位测试,您还需要创建您所在位置的磁图(除非附近已经有地图的公共位置),请参阅开发者网站了解如何完成它:https://developer .indooratlas.com/dashboard(收集数据)。

于 2015-03-16T14:16:44.740 回答
0

IndoorAtlas for Android 不在模拟器上运行。它至少需要 Android Gingerbread 版本。该设备还需要陀螺仪和磁力计。首先检查一下。

于 2016-07-07T02:19:11.757 回答