io2015-codelabs icon indicating copy to clipboard operation
io2015-codelabs copied to clipboard

Voice-Interaction-API Start and End "No Activity Found to Handle Intent"

Open ranimoven opened this issue 9 years ago • 3 comments
trafficstars

I'm following the voice-interaction-api tutorial and both the end and start files result in this error. I'm not sure what to do -- I have followed all the advice given on stackoverflow or on this site but I believe it is an issue with the non-manifest code. Below is the stack trace

06-01 15:14:13.396 27284-27284/com.example.android.voicecamera E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.android.voicecamera, PID: 27284 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.voicecamera/com.example.android.voicecamera.CameraActivity}: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.google.android.GoogleCamera } at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) at android.app.ActivityThread.-wrap11(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) Caused by: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=com.google.android.GoogleCamera } at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1798) at android.app.Instrumentation.execStartActivity(Instrumentation.java:1512) at android.app.Activity.startActivityForResult(Activity.java:3917) at android.app.Activity.startActivityForResult(Activity.java:3877) at android.app.Activity.startActivity(Activity.java:4200) at android.app.Activity.startActivity(Activity.java:4168) at com.example.android.voicecamera.CameraActivity.onCreate(CameraActivity.java:46) at android.app.Activity.performCreate(Activity.java:6237) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)  at android.app.ActivityThread.-wrap11(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:148)  at android.app.ActivityThread.main(ActivityThread.java:5417)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 

ranimoven avatar Jun 01 '16 19:06 ranimoven

Just a guess here, but do we need a Google phone like a nexus? It looks like the code is specifically looking for this package: com.google.android.GoogleCamera. If I comment those lines at least the app loads.

PostImpatica avatar Jan 22 '17 00:01 PostImpatica

That's the package name for Google's camera app. You'll want to install that, or change it to match the package name of your phone's camera.

StephenBrough avatar Jan 29 '17 03:01 StephenBrough

Please check the .xml file, maybe you haven't set the correct path. For example :

<com.example.voice_interaction.AutoFitTextureView android:id="@+id/texture" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentStart="true" android:layout_alignParentTop="true" />

Ranawatt avatar Dec 15 '19 07:12 Ranawatt