Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 4    Views: 83

CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
10/31/13 07:35 PM (12 years ago)

sp youtube plugin

When I press play I get this error. Can someone help please. Thank you! 10-31 21:31:10.053: E/AndroidRuntime(17090): FATAL EXCEPTION: main 10-31 21:31:10.053: E/AndroidRuntime(17090): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.gts/com.keyes.youtube.OpenYouTubePlayerActivity}; have you declared this activity in your AndroidManifest.xml? 10-31 21:31:10.053: E/AndroidRuntime(17090): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1512) 10-31 21:31:10.053: E/AndroidRuntime(17090): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1388) 10-31 21:31:10.053: E/AndroidRuntime(17090): at android.app.Activity.startActivityForResult(Activity.java:3195) 10-31 21:31:10.053: E/AndroidRuntime(17090): at android.app.Activity.startActivity(Activity.java:3302) 10-31 21:31:10.053: E/AndroidRuntime(17090): at com.gta.Sp_youtube_android$1.onClick(Sp_youtube_android.java:144) 10-31 21:31:10.053: E/AndroidRuntime(17090): at android.view.View.performClick(View.java:3565) 10-31 21:31:10.053: E/AndroidRuntime(17090): at android.view.View$PerformClick.run(View.java:14165) 10-31 21:31:10.053: E/AndroidRuntime(17090): at android.os.Handler.handleCallback(Handler.java:605) 10-31 21:31:10.053: E/AndroidRuntime(17090): at android.os.Handler.dispatchMessage(Handler.java:92) 10-31 21:31:10.053: E/AndroidRuntime(17090): at android.os.Looper.loop(Looper.java:137) 10-31 21:31:10.053: E/AndroidRuntime(17090): at android.app.ActivityThread.main(ActivityThread.java:4517) 10-31 21:31:10.053: E/AndroidRuntime(17090): at java.lang.reflect.Method.invokeNative(Native Method) 10-31 21:31:10.053: E/AndroidRuntime(17090): at java.lang.reflect.Method.invoke(Method.java:511) 10-31 21:31:10.053: E/AndroidRuntime(17090): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:980) 10-31 21:31:10.053: E/AndroidRuntime(17090): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:747) 10-31 21:31:10.053: E/AndroidRuntime(17090): at dalvik.system.NativeStart.main(Native Method)
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
10/31/13 07:45 PM (12 years ago)
I fixed it by adding the sp youtube plugin activity in the manifest. I also added the access wifi state permission
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
10/31/13 07:49 PM (12 years ago)
Hi CMCOFFEE, You are getting the forceclose error because you have not declared the activity for the keyes. There comes a jar file with the plugin which you need to put it in the libs folder and then configure a build path to it. After that you need to declare an activity related to this jar file in the manifest file. The logcat error line no. 2 from above shows that you have not declared the activity for this jar file in manifest--- 10-31 21:31:10.053: E/AndroidRuntime(17090): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.gts/com.keyes.youtube.OpenYouTubePlayerActivity}; have you declared this activity in your AndroidManifest.xml? Add the following code in your manifest in the activity section- <activity android:name="com.keyes.youtube.OpenYouTubePlayerActivity" android:configChanges="orientation"></activity> Also dont forget to include an additional permission for wifi in the permissions field. The code for wifi permission is --- <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> Hope this sorts your problem.
 
Sandeep
Android Fan
Profile
Posts: 1260
Reg: Feb 01, 2012
Miraj, India
25,250
like
10/31/13 07:50 PM (12 years ago)
Cool, seems i was typing when you sorted it out.
 
CMCOFFEE
Android Fan
Profile
Posts: 2017
Reg: Jan 04, 2013
Amarillo, Texas
26,670
like
10/31/13 09:38 PM (12 years ago)
Thank you.you explained it better than I did
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.