Pawan Pawan -4 years ago 401
Android Question

Invalid License Key in JWPlayer using external URL

I am trying to play a Video using JWPlayer, with the URL:

But when i try to play the Url I get the error as:

Invalid License Key

Invalid License Key

The Code to Play Video is as follows:
public class VideoActivity extends Activity {

protected void onCreate(@Nullable Bundle savedInstanceState) {

// Get a handle to the JWPlayerFragment
JWPlayerFragment fragment = (JWPlayerFragment) getFragmentManager().findFragmentById(;

// Get a handle to the JWPlayerView
JWPlayerView playerView = fragment.getPlayer();

// Create a PlaylistItem
PlaylistItem video = new PlaylistItem("");

// Load a stream into the player

}//onCreate closes here.....
}//VideoActivity closes here....

Also, the License Keys are as follows:

public static final String JW_PLAYER_API_KEY = "tWdG7dmM";

public static final String JW_PLAYER_API_SECRET = "K5joAa8mzKQTHCGyndqgKbT7";

Also, the License keys are added in the Manifest:


Answer Source

It's not the license key. Go to the dashboard. In dashboard page on left side you can see tools. Select tools. In tools page you can see License Key for Ios, Android etc... Copy that and paste in the position of value. name is JW_LICENSE_KEY

<meta-data android:name="JW_LICENSE_KEY" android:value="{Your License Key from dashboard--> Tools}"/>

Just an FYI to every user.

Don't replace JW_LICENSE_KEY with any key, its a hardcoded String. Put the license in the value part.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download