phonegap Class not found at file:///android_asset/www/cordova-2.0.0.js:938

Viewed 15234

i try to use this plugin and followed the instruction given in the readme.md file.

1)here's my html file

<!DOCTYPE HTML>
<html>
<head>
    <title>TryMakan Video</title>
    <link rel="stylesheet" href="style.css" />
<script type="text/javascript" charset="utf-8" src="cordova-2.0.0.js"></script>
    <script type="text/javascript" charset="utf-8" src="video.js"></script>
    <script type="text/javascript">
function playVideo(){
            window.plugins.videoPlayer.play("http://www.trymakan.my/wp-content/uploads/2011/09/NASI-AYAM-BEREMPAH-KAJANG.mp4");
        }
 </script>
</head> <body>
<a href="#" onClick="playVideo();">play</a>
</body></html>

2) here's my plugins.xml which is located in xml folder

<?xml version="1.0" encoding="utf-8"?>
<plugins>
    <plugin name="VideoPlayer" value="com.phonegap.plugins.video.VideoPlayer"/>
</plugins>

3) i've also copied the VideoPlayer.java into this folder src\com\phonegap\plugins\video

4) additionally, some said I also need to add the plugin into AndroidManifest.xml file, so this is a snippet of it

<application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <action android:name="com.phonegap.plugins.video.VideoPlayer"/>
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

but still, when I click on 'play', log cat will return this error

08-08 04:54:15.823: I/Web Console(309): Error: Status=2 Message=Class not found at file:///android_asset/www/cordova-2.0.0.js:938

update1: here's where the VideoPlayer.java is located

here

I don't see the VideoPlayer.java under Gen folder, does that means it's not compiled? Could this be the problem? If yes, how to solve it?

update2: I checked bin folder, and there VideoPlayer.class under bin\classes\com\phonegap\plugins\video so the VideoPlayer.java is actually compiled

3 Answers
Related