我上傳視頻到YouTube,但類defFounderror的發生?....Android NoClass DefFoundError如何解決它?
我的班級::
import com.google.gdata.data.youtube.VideoEntry;
import com.google.gdata.data.youtube.YouTubeMediaGroup;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
VideoEntry newEntry = new VideoEntry();
}
}
的logcat ::
10-25 12:18:30.214: ERROR/AndroidRuntime(343): java.lang.NoClassDefFoundError: com.google.gdata.data.youtube.VideoEntry
10-25 12:18:30.214: ERROR/AndroidRuntime(343): at com.logistics.main.MainActivity.<init>(MainActivity.java:10)
10-25 12:18:30.214: ERROR/AndroidRuntime(343): at java.lang.Class.newInstanceImpl(Native Method)
10-25 12:18:30.214: ERROR/AndroidRuntime(343): at java.lang.Class.newInstance(Class.java:1429)
10-25 12:18:30.214: ERROR/AndroidRuntime(343): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
10-25 12:18:30.214: ERROR/AndroidRuntime(343): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
10-25 12:18:30.214: ERROR/AndroidRuntime(343): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
10-25 12:18:30.214: ERROR/AndroidRuntime(343): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
10-25 12:18:30.214: ERROR/AndroidRuntime(343): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
它沒有活動,所以爲什麼要添加它?如何添加它? –
您是否在使用此庫http://code.google.com/p/google-api-java-client/? – aromero
@ aromero ..我想上傳視頻到youtube你有任何想法或任何源代碼。在你的鏈接有三個版本的API ... –