2013-02-02 6 views
5

Ich habe versucht, OpenTok Android hello world zum Laufen zu bringen, aber es stürzt beim Start ab. Nach dem Import des Hello-World-Projekts habe ich den Opentok-Android-SDK in das Projekt kopiert und das Projekt in Eclipse neu erstellt. Die Fehler gingen alle weg, aber wenn ich es auf meinem Galaxy Nexus laufen, bekomme ich folgende Fehlermeldung:OpenTok Android-Demo funktioniert nicht - Klasse "com.opentok.helloworld.MainActivity" nicht gefunden

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 

Mache ich etwas falsch? Sollte ich etwas mit dem Build Path machen? Ich bin mir nicht sicher, was ich tun soll/wie es geht.

Ich sah auch this Beitrag aber konnte nicht herausfinden, was die Lösung ist. Jede Hilfe wäre willkommen. Danke

Antwort

6

Ich stieß auf dieses Problem vor.

was ich getan habe ist:

  1. die "Libs" Datei in dem Projekt löschen.
  2. neue Ordner "libs" im Projekt erstellen.
  3. Verschieben Sie die Gläser aus dem Ordner "opentok-android-sdk" in "libs"
  4. Konfiguration Build-Pfad.

dann funktioniert es.

holp diese Hilfe.

1

Setzen Sie die Tokbox-Bibliothek Gläser (dort sind Sie 5 oder 6 Gläser, wie ich mich erinnere) in libs-Ordner. Das hat mir geholfen.