科尔多瓦你好世界应用程序崩溃 [英] Cordova hello world app crashing

查看:86
本文介绍了科尔多瓦你好世界应用程序崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Android开发的新手。我正在cordova平台上工作

I am new in Android Development. I am working on cordova platform

我创建了一个示例hello world应用程序,当我尝试在genymotion中打开它时遇到此错误。尽管该应用程序编译成功,但是当我在genymotion中运行它时,它仅显示带有文本不幸的是, APP已停止的提示。

I have created a sample hello world app and getting this error when i am trying to open it in genymotion. ALthough the app compile succesfully but when i run it in genymotion it just shows the prompt with text "Unfortunately "APP" has stopped."

错误日志显示。

01-12 08:16:04.867    2073-2073/com.technoserves.crudnew D/dalvikvm﹕ Late-enabling CheckJNI
    01-12 08:16:06.107    2073-2073/com.technoserves.crudnew W/dalvikvm﹕ Unable to resolve superclass of Lcom/technoserves/crudnew/CordovaApp; (14)
    01-12 08:16:06.119    2073-2073/com.technoserves.crudnew W/dalvikvm﹕ Link of class 'Lcom/technoserves/crudnew/CordovaApp;' failed
    01-12 08:16:06.135    2073-2073/com.technoserves.crudnew D/AndroidRuntime﹕ Shutting down VM
    01-12 08:16:06.135    2073-2073/com.technoserves.crudnew W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0xa6142908)
    01-12 08:16:06.155    2073-2073/com.technoserves.crudnew E/AndroidRuntime﹕ FATAL EXCEPTION: main
        java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.technoserves.crudnew/com.technoserves.crudnew.CordovaApp}: java.lang.ClassNotFoundException: Didn't find class "com.technoserves.crudnew.CordovaApp" on path: /data/app/com.technoserves.crudnew-1.apk
                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
                at android.app.ActivityThread.access$600(ActivityThread.java:141)
                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
                at android.os.Handler.dispatchMessage(Handler.java:99)
                at android.os.Looper.loop(Looper.java:137)
                at android.app.ActivityThread.main(ActivityThread.java:5041)
                at java.lang.reflect.Method.invokeNative(Native Method)
                at java.lang.reflect.Method.invoke(Method.java:511)
                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
                at dalvik.system.NativeStart.main(Native Method)
         Caused by: java.lang.ClassNotFoundException: Didn't find class "com.technoserves.crudnew.CordovaApp" on path: /data/app/com.technoserves.crudnew-1.apk
                at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
                at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
                at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
                at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
                at android.app.ActivityThread.access$600(ActivityThread.java:141)
                at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
                at android.os.Handler.dispatchMessage(Handler.java:99)
                at android.os.Looper.loop(Looper.java:137)
                at android.app.ActivityThread.main(ActivityThread.java:5041)
                at java.lang.reflect.Method.invokeNative(Native Method)
                at java.lang.reflect.Method.invoke(Method.java:511)
                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
                at dalvik.system.NativeStart.main(Native Method)
    01-12 08:16:22.399    2073-2073/com.technoserves.crudnew I/Process﹕ Sending signal. PID: 2073 SIG: 9

我更新了cordova来解决,但是几天仍然还是一样的错误

I have updated my cordova to resolve but still same error however a few days ago it was working fine and i have build some apps.

推荐答案

首先从以下链接下载Cordova jar文件:

First download Cordova jar file from following link:

http: //www.java2s.com/cn/Code/JarDownload/cordova/cordova-1.8.1.jar.zip

之后,将文件夹解压缩并放入cordova -1.8.1在eclipse中的项目的libs文件夹中

after that extract the folder and put cordova-1.8.1 inside your libs folder of project in eclipse

然后右键单击您的项目->属性,然后从左侧窗格中选择Android,然后滚动到底部,删除cordova库。

And right click on your project--> properties and Select Android from left pane and scroll to bottom remove the cordova library if added.

然后清理并构建您的项目。

then clean and build your project.

这篇关于科尔多瓦你好世界应用程序崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆