RogueWave
Aspiring developer
Profile
Posts: 337
Reg: Jan 23, 2013
Park City
5,120
04/16/14 11:19 AM (10 years ago)

Dalvik Format Failed

BT_3.0 Core Self hosted. Running Eclipse, Android Open Source Project, Android Development Toolkit 22.6.2. v201403 on a Macbook Pro. As soon as I import youtubeopenactivity.jar into my main project libs folder and right click into build path, as per instructions provided by the Android Youtube Streamer Plugin, I get the following error upon running my test device, a Nexus 7: Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/keyes/youtube/OpenYouTubePlayerActivity; myprojectnamehere Unknown Android Packaging Problem Have tried to clean, re-start Eclipse to no avail. Anyone else ever see this?
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/16/14 12:11 PM (10 years ago)
Have you tried to clean the project? Project > Clean, and then select everything. It'll break any old links there might be. Mark
 
RogueWave
Aspiring developer
Profile
Posts: 337
Reg: Jan 23, 2013
Park City
5,120
like
04/16/14 12:14 PM (10 years ago)
Hi Mark, yes, several times. Stack overflow suggests there is an issue in the "Progaurd" file? This is out of my realm.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/16/14 12:34 PM (10 years ago)
I don't have any experience with Proguard, unfortunately. But I don't think that's the problem. In the .java file for that plugin, I'm wondering if it doesn't have your project name specified in it? I ask because of this line: myprojectnamehere Unknown Android Packaging Problem myprojectnamehere should probably be whatever your project is. Check that out and see if it's the case. Mark
 
RogueWave
Aspiring developer
Profile
Posts: 337
Reg: Jan 23, 2013
Park City
5,120
like
04/16/14 12:38 PM (10 years ago)
I wrote that phrase in for this post for privacy. : ^ ) I just deleted openyoutubeactivity.jar from my libs and build path, cleaned and now I can run the app on my device. (Nexus 7) When I go to play the video I need to play using the Android Youtube Streamer, the App crashes. LOGCAT: 04-16 13:25:30.501: E/AndroidRuntime(14584): FATAL EXCEPTION: main 04-16 13:25:30.501: E/AndroidRuntime(14584): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.myappname/com.keyes.youtube.OpenYouTubePlayerActivity}: java.lang.ClassCastException: com.keyes.youtube.OpenYouTubePlayerActivity cannot be cast to android.app.Activity 04-16 13:25:30.501: E/AndroidRuntime(14584): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106) 04-16 13:25:30.501: E/AndroidRuntime(14584): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) 04-16 13:25:30.501: E/AndroidRuntime(14584): at android.app.ActivityThread.access$600(ActivityThread.java:141) 04-16 13:25:30.501: E/AndroidRuntime(14584): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) 04-16 13:25:30.501: E/AndroidRuntime(14584): at android.os.Handler.dispatchMessage(Handler.java:99) 04-16 13:25:30.501: E/AndroidRuntime(14584): at android.os.Looper.loop(Looper.java:137) 04-16 13:25:30.501: E/AndroidRuntime(14584): at android.app.ActivityThread.main(ActivityThread.java:5041) 04-16 13:25:30.501: E/AndroidRuntime(14584): at java.lang.reflect.Method.invokeNative(Native Method) 04-16 13:25:30.501: E/AndroidRuntime(14584): at java.lang.reflect.Method.invoke(Method.java:511) 04-16 13:25:30.501: E/AndroidRuntime(14584): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 04-16 13:25:30.501: E/AndroidRuntime(14584): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 04-16 13:25:30.501: E/AndroidRuntime(14584): at dalvik.system.NativeStart.main(Native Method) 04-16 13:25:30.501: E/AndroidRuntime(14584): Caused by: java.lang.ClassCastException: com.keyes.youtube.OpenYouTubePlayerActivity cannot be cast to android.app.Activity I know the plug in developer wrote that his plug in may not work on some devices. I'm running Android version 4.2.2. on my Nexus 7 and the plug in developer said his plug in checked out fine on his Nexus 7 4.2.2
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/16/14 12:46 PM (10 years ago)
I'll have to check out the instructions for that plugin. It appears that you have multiple of the same jar file somewhere, and that's causing the problem. Mark
 
RogueWave
Aspiring developer
Profile
Posts: 337
Reg: Jan 23, 2013
Park City
5,120
like
04/16/14 12:48 PM (10 years ago)
Just edited my last message.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/16/14 12:52 PM (10 years ago)
Well, glad you got past the first problem! Not sure what's up in the new problem. Nothing in the LogCat you pasted stands out for me. You might have to contact the developer on this one. Mark
 
RogueWave
Aspiring developer
Profile
Posts: 337
Reg: Jan 23, 2013
Park City
5,120
like
04/16/14 01:05 PM (10 years ago)
Yeah, I messaged him 4 days ago via BT PM, Skype and his email. He is MIA. I need to get some sort of a video layer to work in this app and non of the video plug ins want to work and neither of the developers have responded with regard to the video player plug ins. The duplicate app for IOS is fine. For one video, I simply embedded the HTML into the Custom HTML plug in and it works just fine! I try the same thing for Android, the darn video won't play due to youtube API issues with Android. I don't get it? Shouldn't anyone be able to play a video by virtue of the video URL regardless of where it resides? The device plays all the videos I want through the actual youtube app on my device. I need an Android youtube player that freakin' works and I need it fast. Time is running out as well as people's patience.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
04/16/14 01:12 PM (10 years ago)
Well, I don't rightly know the answer to this! I would "think" that a video would work via a URL, but there may be some limitations based on the type of activity (view) you are running. There has been lots of issues with video on Android over the life of BT, and it's not always BT's fault. For Android, I'm not sure what the answer is at the moment.
 
RogueWave
Aspiring developer
Profile
Posts: 337
Reg: Jan 23, 2013
Park City
5,120
like
04/16/14 01:34 PM (10 years ago)
I don't know either. Looks like until someone does, I need to strip out this app to a basic webpage conglomerate.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
04/16/14 09:54 PM (10 years ago)
I am constantly amazed at Mark's canny eye on catching anomalies in a log file!
 

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.