0
votes

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.

2
you have not define launcher activity so getting this problem add <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> to activity to which you want to run first - Android User
@AndroidUser It is a google glass app, i does not have a launcher activity. It is operated using Voice command. - Harry
In the Edit Configuration screen make the following changes: Module: app Package: Deploy default APK Activity: Launch default Activity Target Device: USB Drive check acadgild.com/blog/develop-your-first-google-glass-app-android - Android User
@AndroidUser i already did the same, thanks for the effort. - Harry

2 Answers

0
votes

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
0
votes

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.