【问题标题】:Android ZBar scanner library weird behaviourAndroid ZBar 扫描器库奇怪的行为
【发布时间】:2017-04-03 14:24:17
【问题描述】:

我正在尝试在 Android Studio 中实现一个使用 Zbar 扫描器库 (https://github.com/dm77/barcodescanner) 的应用。 我已经将它导入到我的 IDE 中,经过一连串尝试重新组织各种版本库的兼容性之后,我选择修改使用 Zbar 库的现有示例。

奇怪的行为出现了:当涉及到一个新的 Activity(不是原始示例中已经存在的)时,应用程序崩溃,没有错误或异常。

我为我的 IDE 的日志设置了“无过滤器”,当这个应用程序崩溃时我可以看到的日志是:

04-03 16:22:42.381 2513-2513/? E/Thermal-daemon: [ap] temp_new :33  temp_old :34
04-03 16:22:42.382 2513-2513/? E/Thermal-daemon: Report temperature: [ap] temp :33  report_threshold:1
04-03 16:22:43.644 3085-3520/? E/InputReader: QEEXO fs_classify_touch NULL, not calling FingerSense
04-03 16:22:43.702 3085-3520/? E/InputReader: QEEXO fs_touch_up NULL, not calling FingerSense
04-03 16:22:43.728 3085-3520/? E/InputReader: QEEXO fs_classify_touch NULL, not calling FingerSense
04-03 16:22:43.730 3085-3085/? E/QosMonitor: query:IPQos is not initial!!
04-03 16:22:43.757 3085-3103/? E/ReportTools: This is not beta user build
04-03 16:22:43.790 2484-2484/? E/lowmemorykiller: Error writing /proc/1360/oom_score_adj; errno=22
04-03 16:22:43.820 3085-3520/? E/InputReader: QEEXO fs_touch_up NULL, not calling FingerSense
04-03 16:22:43.828 3713-4443/? E/HwSystemManager: LeisureTrafficSetting:result is empty
04-03 16:22:43.865 3085-3519/? E/InputDispatcher: channel '8304ce5 me.dm7.barcodescanner.zbar.sample/me.dm7.barcodescanner.zbar.sample.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
04-03 16:22:43.867 3085-3095/? E/HsmCoreServiceImpl: onTransact in code is: 102
04-03 16:22:43.896 583-595/? E/TotemWeather: WidgetUtils getWidgetShowCityInfo return myLocation
04-03 16:22:43.899 4135-4207/? E/HwLauncher: SettingsEx , no such field.
04-03 16:22:43.963 2486-2486/? E/HAL: load: id=gralloc != hmi->id=gralloc
04-03 16:22:44.012 2486-2486/? E/HAL: load: id=gralloc != hmi->id=gralloc
04-03 16:22:44.146 2486-2486/? E/hwcomposer: setGpuBoost:228: Can't open /sys/class/devfreq/gpufreq/max_freq: Permission denied
04-03 16:22:44.494 2486-2486/? E/HAL: load: id=gralloc != hmi->id=gralloc

【问题讨论】:

标签: android zbar


【解决方案1】:

您必须进入AndroidManifest.xml 并将您的SplashActivity.class 设置为启动活动,如下所示:

<activity android:name=".SplashActivity"
          android:theme="@style/FullScreenTheme"
          android:screenOrientation="portrait">

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

</activity>

【讨论】:

  • 谢谢,但是已经有意图过滤器了,你可以在 github 代码中看到
猜你喜欢
  • 1970-01-01
  • 2023-03-03
  • 1970-01-01
  • 1970-01-01
  • 2016-02-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多