2013-07-26 101 views
0

剛剛購買了PhoneGap 2.x移動應用程序開發熱點書籍,以提高我與PhoneGap合作的知識,並嘗試從書籍中運行一些應用程序。我從他們的github存儲庫(https://github.com/photokandyStudios/PhoneGap-HotShot-Book-Code-Bundle)下載了其應用程序,並嘗試運行第1章中的第一個應用程序(QuizApp)。導入整個文件夾與Eclipse(導入>現有的Android代碼到工作區),當我嘗試運行它在我的模擬器或我的真實Android設備上,它只是停止工作,並關閉。看起來一切都在他們正確的地方,但沒有。Phonegap Hotshot書籍示例應用程序無法正常工作

在這裏,我會提供我的logcat的信息:

07-26 15:24:51.418: E/Trace(853): error opening trace file: No such file or directory (2) 
07-26 15:24:51.688: W/dalvikvm(853): Unable to resolve superclass of Lcom/phonegaphotshot/QuizTime/QuizTime; (15) 
07-26 15:24:51.688: W/dalvikvm(853): Link of class 'Lcom/phonegaphotshot/QuizTime/QuizTime;' failed 
07-26 15:24:51.718: D/AndroidRuntime(853): Shutting down VM 
07-26 15:24:51.718: W/dalvikvm(853): threadid=1: thread exiting with uncaught exception (group=0x40a13300) 
07-26 15:24:51.798: E/AndroidRuntime(853): FATAL EXCEPTION: main 
07-26 15:24:51.798: E/AndroidRuntime(853): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.phonegaphotshot.QuizTime/com.phonegaphotshot.QuizTime.QuizTime}: java.lang.ClassNotFoundException: com.phonegaphotshot.QuizTime.QuizTime 
07-26 15:24:51.798: E/AndroidRuntime(853): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1983) 
07-26 15:24:51.798: E/AndroidRuntime(853): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084) 
07-26 15:24:51.798: E/AndroidRuntime(853): at android.app.ActivityThread.access$600(ActivityThread.java:130) 
07-26 15:24:51.798: E/AndroidRuntime(853): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195) 
07-26 15:24:51.798: E/AndroidRuntime(853): at android.os.Handler.dispatchMessage(Handler.java:99) 
07-26 15:24:51.798: E/AndroidRuntime(853): at android.os.Looper.loop(Looper.java:137) 
07-26 15:24:51.798: E/AndroidRuntime(853): at android.app.ActivityThread.main(ActivityThread.java:4745) 
07-26 15:24:51.798: E/AndroidRuntime(853): at java.lang.reflect.Method.invokeNative(Native Method) 
07-26 15:24:51.798: E/AndroidRuntime(853): at java.lang.reflect.Method.invoke(Method.java:511) 
07-26 15:24:51.798: E/AndroidRuntime(853): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786) 
07-26 15:24:51.798: E/AndroidRuntime(853): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 
07-26 15:24:51.798: E/AndroidRuntime(853): at dalvik.system.NativeStart.main(Native Method) 
07-26 15:24:51.798: E/AndroidRuntime(853): Caused by: java.lang.ClassNotFoundException: com.phonegaphotshot.QuizTime.QuizTime 
07-26 15:24:51.798: E/AndroidRuntime(853): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 
07-26 15:24:51.798: E/AndroidRuntime(853): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 
07-26 15:24:51.798: E/AndroidRuntime(853): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 
07-26 15:24:51.798: E/AndroidRuntime(853): at android.app.Instrumentation.newActivity(Instrumentation.java:1053) 
07-26 15:24:51.798: E/AndroidRuntime(853): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974) 
07-26 15:24:51.798: E/AndroidRuntime(853): ... 11 more 

感謝所有幫助

回答

0

解決它!如果有類似問題的人,只是做一步一步來:

右鍵點擊Cordovaxxx.jar - >配置構建路徑中的Tab鍵順序和出口,並確保這些的選擇:

1. Android (in my case was Adnroid 4.1.2) 
2. Android Dependencies 
3. Cordova.... 
4. ..../src 
5. ..../gen 
+0

你試過項目6?它在我的Android手機上崩潰,內存不足錯誤... – Mirko

相關問題