我一直在尝试让 OpenTok Android hello world正常工作,但它在启动时一直崩溃。导入Hello world项目后,将opentok android sdk复制到项目中,在eclipse中重新构建项目。错误都消失了,但是当我在 Galaxy Nexus 上运行它时,出现以下错误:
02-02 10:01:39.321: E/AndroidRuntime(17238): FATAL EXCEPTION: main
02-02 10:01:39.321: E/AndroidRuntime(17238): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.opentok.helloworld/com.opentok.helloworld.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.opentok.helloworld.MainActivity" on path: /data/app/com.opentok.helloworld-2.apk
02-02 10:01:39.321: E/AndroidRuntime(17238): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
02-02 10:01:39.321: E/AndroidRuntime(17238): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
02-02 10:01:39.321: E/AndroidRuntime(17238): at android.app.ActivityThread.access$600(ActivityThread.java:141)
02-02 10:01:39.321: E/AndroidRuntime(17238): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
02-02 10:01:39.321: E/AndroidRuntime(17238): at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 10:01:39.321: E/AndroidRuntime(17238): at android.os.Looper.loop(Looper.java:137)
02-02 10:01:39.321: E/AndroidRuntime(17238): at android.app.ActivityThread.main(ActivityThread.java:5039)
02-02 10:01:39.321: E/AndroidRuntime(17238): at java.lang.reflect.Method.invokeNative(Native Method)
02-02 10:01:39.321: E/AndroidRuntime(17238): at java.lang.reflect.Method.invoke(Method.java:511)
02-02 10:01:39.321: E/AndroidRuntime(17238): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-02 10:01:39.321: E/AndroidRuntime(17238): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-02 10:01:39.321: E/AndroidRuntime(17238): at dalvik.system.NativeStart.main(Native Method)
02-02 10:01:39.321: E/AndroidRuntime(17238): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.opentok.helloworld.MainActivity" on path: /data/app/com.opentok.helloworld-2.apk
02-02 10:01:39.321: E/AndroidRuntime(17238): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
02-02 10:01:39.321: E/AndroidRuntime(17238): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
02-02 10:01:39.321: E/AndroidRuntime(17238): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
02-02 10:01:39.321: E/AndroidRuntime(17238): at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
02-02 10:01:39.321: E/AndroidRuntime(17238): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
02-02 10:01:39.321: E/AndroidRuntime(17238): ... 11 more
难道我做错了什么?我应该对构建路径做些什么吗?我不知道该怎么做/怎么做。
我也看到了这篇文章,但找不到解决方案。任何帮助,将不胜感激。谢谢