0

I am working on a Google glass Android app. I have installed the glass development kit (GDK) in Android SDK. Now I created a glass project using Android Studio (Version 3.3.2). The newly created project is showing an error "Default Activity not found" in run->edit configuration.

Please refer the screenshot for the error.

1. enter image description here

And 2. By clicking run->Edit Configuration in menu.

enter image description here

I have searched a lot on Google and found many articles regarding the same. All are suggested to set the edit configurations option like below.

Module: app

Package: Deploy default APK

Activity: Launch default Activity

Target Device: USB Device

I did the same, but no one is working for me. After spending the whole day to make it work, I came here. This error is due to the Launcher activity, because there is no launcher activity in Google glass project instead it uses Voice Trigger intent filter. It is similar to wearable apps they also don't have the launcher activity.

Harry
  • 138
  • 1
  • 9
  • you have not define launcher activity so getting this problem add to activity to which you want to run first – Developer Apr 30 '19 at 12:22
  • @AndroidUser It is a google glass app, i does not have a launcher activity. It is operated using Voice command. – Harry Apr 30 '19 at 12:23
  • In the Edit Configuration screen make the following changes: Module: app Package: Deploy default APK Activity: Launch default Activity Target Device: USB Drive check https://acadgild.com/blog/develop-your-first-google-glass-app-android – Developer Apr 30 '19 at 12:28
  • @AndroidUser i already did the same, thanks for the effort. – Harry Apr 30 '19 at 12:46
  • 1
    Possible duplicate of ["Default activity not found" for a wearable app created with Android Studio template](https://stackoverflow.com/questions/27970210/default-activity-not-found-for-a-wearable-app-created-with-android-studio-temp) – Zoe Apr 30 '19 at 13:02
  • @Zoe that is for wearable and is totally different from my question, so kindly mark it as not duplicate. – Harry Apr 30 '19 at 13:34
  • Still the same problem as long as you're using Android Studio (which appears to be the cause of the issue, independently of Wear, TV, Glass, or any other IOT system Google has come up with) – Zoe Apr 30 '19 at 13:42
  • @Zoe It may be a duplicate, but there is no solution for the same. I got the issue and asked the question, may be someone answered it. It may be useful for many others who are looking for the same. – Harry Apr 30 '19 at 14:11

2 Answers2

0

Android Studio won't let you use a standard run configuration without specifying a launcher in the manifest.

You could try using the gradle command line instead:

./gradlew installDebug
Philio
  • 3,675
  • 1
  • 23
  • 33
  • there is no launcher activity in the manifest. It has activity with intent filter – Harry Apr 30 '19 at 12:21
  • Just saw your edit, wasn't clear before. I'll edit the answer. – Philio Apr 30 '19 at 12:24
  • Its working, the app is installed in the glass, but it is not listed in the apps menu. I have checked in the settings(apps), it is available. How can i make it available with all the apps. – Harry Apr 30 '19 at 12:52
  • You won't see an app listed unless you have an activity set as the launcher. I've never used glass but if you have the equivalent of the apps section in settings on an Android phone you'll see the app listed there. I assume any alternative entry intents into your app should work as expected. – Philio Apr 30 '19 at 13:50
0

In case you haven't resolved the issue. I came across similar issue before, two ways worked for me:

  1. Choose "Nothing" as the option. You will be able to run the app manually on the Glass, but your debugger won't work straight away. You have to manually attach the debugger to the process. You may also have to use logcat if there is a bug in the launching process.
  2. Specify an activity (whichever is associated with voice trigger).

Also, I noticed that you created the app using Kotlin. Kotlin activity didn't work in my case, throwing exceptions associated with nullable var when resuming the activity. Non-activity classes worked fine. Please let me know if Kotlin activity worked in your case.

Mxi
  • 1
  • 2