问题描述
我在这里运行了计时器,秒表和指南针示例:
I ran the timer, stopwatch, and compass example here:
https://developers.google.com/glass/develop/gdk/quick-start#for_android_beginners
但是,该应用程序会生成但无法运行.这就是我在logcat中可以得到的一切:
However, the application builds but doesn't run. This is all I can get in logcat:
[2013-11-19 15:58:21 - CompassMenuActivity] ------------------------------
[2013-11-19 15:58:21 - CompassMenuActivity] Android Launch!
[2013-11-19 15:58:21 - CompassMenuActivity] adb is running normally.
[2013-11-19 15:58:21 - CompassMenuActivity] No Launcher activity found!
[2013-11-19 15:58:21 - CompassMenuActivity] The launch will only sync the application package on the device!
[2013-11-19 15:58:21 - CompassMenuActivity] Performing sync
[2013-11-19 15:58:21 - CompassMenuActivity] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2013-11-19 15:58:23 - CompassMenuActivity] Uploading CompassMenuActivity.apk onto device '0***************0C'
[2013-11-19 15:58:23 - CompassMenuActivity] Installing CompassMenuActivity.apk...
[2013-11-19 15:58:24 - CompassMenuActivity] Success!
[2013-11-19 15:58:24 - CompassMenuActivity] /CompassMenuActivity/bin/CompassMenuActivity.apk installed on device
[2013-11-19 15:58:24 - CompassMenuActivity] Done!
我正在使用
Eclipse Standard/SDK
Eclipse Standard/SDK
版本:开普勒发行内部版本号:20130614-0229
Version: Kepler ReleaseBuild id: 20130614-0229
推荐答案
在Eclipse中使用运行方式"菜单只会在设备上安装APK,而不会运行APK,因为清单中没有任何应用程序组件有android.intent.category.LAUNCHER
.
Using the "Run as" menu in Eclipse will only install the APK on the device but won't run it, because none of the application components in the manifest have android.intent.category.LAUNCHER
.
相反,在安装APK之后,您可以使用Glass上的语音触发器来启动它.例如,为指南针"示例说好的玻璃杯,显示一个指南针".这将启动将实时卡发布到时间轴的CompassService
服务.
Instead, after the APK is installed, you can use the voice trigger on Glass to start it. For example, say "ok glass, show a compass" for the Compass sample. This will start the CompassService
service that publishes the live card to the timeline.
这篇关于在Glass上运行计时器,秒表和指南针示例似乎不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!