我可以得到样本APK CompassActivity应用程序在Glass上运行,但没有运行LevelActivity或StopWatchActivity?我正在使用Eclipse。记录下面。有什么建议么?
I can get the sample APK CompassActivity app to run on Glass but no luck with LevelActivity or StopWatchActivity? I am using Eclipse. Log below. Any suggestions?
[2013-07-29 17:02:18 - LevelActivity] ------------------------------ [2013-07-29 17:02:18 - LevelActivity] Android Launch! [2013-07-29 17:02:18 - LevelActivity] adb is running normally. [2013-07-29 17:02:18 - LevelActivity] No Launcher activity found! [2013-07-29 17:02:18 - LevelActivity] The launch will only sync the application package on the device! [2013-07-29 17:02:18 - LevelActivity] Performing sync [2013-07-29 17:02:28 - LevelActivity] Uploading LevelActivity.apk onto device '015DA7720F00D016' [2013-07-29 17:02:28 - LevelActivity] Installing LevelActivity.apk... [2013-07-29 17:02:29 - LevelActivity] Success! [2013-07-29 17:02:29 - LevelActivity] /LevelActivity/bin/LevelActivity.apk installed on device [2013-07-29 17:02:29 - LevelActivity] Done!推荐答案
转到运行>运行配置。然后,在启动操作下,将其从将启动默认活动更改为启动:并选择下拉列表中列出的活动(例如 com.google.glass.samples.stopwatch.StopWatchActivity )。点击应用并尝试再次运行APK。
Go to Run > Run Configurations. Then, under Launch Action, change it from Launch Default Activity to Launch: and select the activity listed in the dropdown (e.g.google.glass.samples.stopwatch.StopWatchActivity). Hit Apply and try running the APK again.
您必须这样做的原因是因为示例代码的主要活动没有< category android:name =android。 intent.category.LAUNCHER/> 在其< intent-filter> 中。没有启动器是有意的:有一个在其中一个APK GitHub示例中提取请求,过去的回应是:
The reason you have to do this is because the main activity for the sample code does not have <category android:name="android.intent.category.LAUNCHER" /> in its <intent-filter>. Not having a launcher is intentional: there was a pull request on one of the APK GitHub samples in the past and the response was:
感谢您的拉动请求;然而,Glassware不会以这种方式推出。
Thank you for the pull request; however, Glassware will not be launched in this fashion.
更多推荐
Google Glass Sample APK
发布评论