Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/181.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用android youtube播放器时出错_Android_Youtube - Fatal编程技术网

使用android youtube播放器时出错

使用android youtube播放器时出错,android,youtube,Android,Youtube,我正在尝试在我的应用程序中使用android youtube播放器: 但我在打电话时出错了: java.lang.NoClassDefFoundError: com.keyes.youtube.OpenYouTubePlayerActivity 以下是我写的: String urlStr= "http://www.youtube.com/user/armadamusic "; Uri uri = Uri.parse(urlStr); Intent lVideoIntent = new Inte

我正在尝试在我的应用程序中使用android youtube播放器: 但我在打电话时出错了:

java.lang.NoClassDefFoundError: com.keyes.youtube.OpenYouTubePlayerActivity
以下是我写的:

String urlStr= "http://www.youtube.com/user/armadamusic ";
Uri uri = Uri.parse(urlStr);
Intent lVideoIntent = new Intent(null, Uri.parse("ytpl://"+uri), this, OpenYouTubePlayerActivity.class);
startActivity(lVideoIntent);

问题是什么?

对于OpenYouTubePlayePractivity,您需要将活动添加到AndroidManifest.xml中:

<activity android:name="com.keyes.youtube.OpenYouTubePlayerActivity" />


所以Java中的NoClassDefFoundError是在JVM无法在运行时找到编译时可用的特定类时出现的。我知道这一点,但我不知道原因,使用了lib&我做了网站上告诉我的一切