Following this tutorial: Getting started with Android.
I try to create my first phonegap project using Eclipse. However, when clicking on the icon of "Cordova Example"(name of the application from the example of PhoneGap) on the screen of device. An error named : "the application Cordova Example (process org.apache.cordova.example) has stopped unexpectedly. Please try again" occurs.
This is the log file when error occurs:
01-02 09:40:46.280: D/AndroidRuntime(310): Shutting down VM
01-02 09:40:46.280: W/dalvikvm(310): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
01-02 09:40:46.308: E/AndroidRuntime(310): FATAL EXCEPTION: main
01-02 09:40:46.308: E/AndroidRuntime(310): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{org.apache.cordova.example/org.apache.cordova.example.cordovaExample}: java.lang.ClassNotFoundException: org.apache.cordova.example.cordovaExample in loader dalvik.system.PathClassLoader[/data/app/org.apache.cordova.example-2.apk]
01-02 09:40:46.308: E/AndroidRuntime(310): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
01-02 09:40:46.308: E/AndroidRuntime(310): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
01-02 09:40:46.308: E/AndroidRuntime(310): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
01-02 09:40:46.308: E/AndroidRuntime(310): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
01-02 09:40:46.308: E/AndroidRuntime(310): at android.os.Handler.dispatchMessage(Handler.java:99)
01-02 09:40:46.308: E/AndroidRuntime(310): at android.os.Looper.loop(Looper.java:123)
01-02 09:40:46.308: E/AndroidRuntime(310): at android.app.ActivityThread.main(ActivityThread.java:4627)
01-02 09:40:46.308: E/AndroidRuntime(310): at java.lang.reflect.Method.invokeNative(Native Method)
01-02 09:40:46.308: E/AndroidRuntime(310): at java.lang.reflect.Method.invoke(Method.java:521)
01-02 09:40:46.308: E/AndroidRuntime(310): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-02 09:40:46.308: E/AndroidRuntime(310): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-02 09:40:46.308: E/AndroidRuntime(310): at dalvik.system.NativeStart.main(Native Method)
01-02 09:40:46.308: E/AndroidRuntime(310): Caused by: java.lang.ClassNotFoundException: org.apache.cordova.example.cordovaExample in loader dalvik.system.PathClassLoader[/data/app/org.apache.cordova.example-2.apk]
01-02 09:40:46.308: E/AndroidRuntime(310): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
01-02 09:40:46.308: E/AndroidRuntime(310): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
01-02 09:40:46.308: E/AndroidRuntime(310): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
01-02 09:40:46.308: E/AndroidRuntime(310): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
01-02 09:40:46.308: E/AndroidRuntime(310): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
01-02 09:40:46.308: E/AndroidRuntime(310): ... 11 more
The java.lang.ClassNotFoundException seems like can't find your Main Class, it could be a name problem of your java main class or in config.xml or in manifest, check all names are correctly.
Regards.
Related
I just loaded my app created by cocos2dx-3.10 and when I open with it an AVD (again I haven't done any modifications to the app) the app crashes and gives the error: Unfortunately, libcocos2dx has crashed.
here is what I get in my android Monitor:
03-05 18:34:56.668 1435-1435/? D/dalvikvm: Not late-enabling CheckJNI (already on)
03-05 18:34:56.989 1435-1435/com.trying.name E/Trace: error opening trace file: No such file or directory (2)
03-05 18:34:57.419 1435-1435/com.trying.name D/AndroidRuntime: Shutting down VM
03-05 18:34:57.419 1435-1435/com.trying.name W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xb2f2b288)
03-05 18:34:57.518 1435-1435/com.trying.name E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.UnsatisfiedLinkError: Couldn't load cocos2dcpp: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:365)
at java.lang.System.loadLibrary(System.java:535)
at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:248)
at org.cocos2dx.lib.Cocos2dxActivity.onCreate(Cocos2dxActivity.java:263)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
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:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
03-05 18:35:11.559 1435-1435/? I/Process: Sending signal. PID: 1435 SIG: 9
when i run an application on Eclipse show me this message (the program has stop unexpectedly please try again later ) force stop and i have this error exception:
11-29 17:22:18.893: D/AndroidRuntime(275): Shutting down VM
11-29 17:22:18.893: W/dalvikvm(275): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
11-29 17:22:18.923: E/AndroidRuntime(275): FATAL EXCEPTION: main
11-29 17:22:18.923: E/AndroidRuntime(275): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.progress_bar/com.example.progress_bar.MainActivity}: java.lang.ClassNotFoundException: com.example.progress_bar.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.progress_bar-1.apk]
11-29 17:22:18.923: E/AndroidRuntime(275): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
11-29 17:22:18.923: E/AndroidRuntime(275): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
11-29 17:22:18.923: E/AndroidRuntime(275): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-29 17:22:18.923: E/AndroidRuntime(275): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
11-29 17:22:18.923: E/AndroidRuntime(275): at android.os.Handler.dispatchMessage(Handler.java:99)
11-29 17:22:18.923: E/AndroidRuntime(275): at android.os.Looper.loop(Looper.java:123)
11-29 17:22:18.923: E/AndroidRuntime(275): at android.app.ActivityThread.main(ActivityThread.java:4627)
11-29 17:22:18.923: E/AndroidRuntime(275): at java.lang.reflect.Method.invokeNative(Native Method)
11-29 17:22:18.923: E/AndroidRuntime(275): at java.lang.reflect.Method.invoke(Method.java:521)
11-29 17:22:18.923: E/AndroidRuntime(275): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-29 17:22:18.923: E/AndroidRuntime(275): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-29 17:22:18.923: E/AndroidRuntime(275): at dalvik.system.NativeStart.main(Native Method)
11-29 17:22:18.923: E/AndroidRuntime(275): Caused by: java.lang.ClassNotFoundException: com.example.progress_bar.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.progress_bar-1.apk]
11-29 17:22:18.923: E/AndroidRuntime(275): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
11-29 17:22:18.923: E/AndroidRuntime(275): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
11-29 17:22:18.923: E/AndroidRuntime(275): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
11-29 17:22:18.923: E/AndroidRuntime(275): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
11-29 17:22:18.923: E/AndroidRuntime(275): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
11-29 17:22:18.923: E/AndroidRuntime(275): ... 11 more
Can you post your MainActivity.xml? And i'd recommend when you create a project to rename your com.example.appname to something like app.appname. Play Store doesn't accept the com.example prefix.
i'm getting this message when i run my application i don't know why i'm getting it could any one help me. here is the logcat.
java.lang.VerifyError: com.kosh.me.Smaller
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1429)
at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:876)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:634)
at dalvik.system.NativeStart.main(Native Method)
This happens when the build library classes conflict with those at run-time. Try performing a Clean of your project followed by a build.
15 reports
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.oas.fruitkungfufree/com.openfeint.internal.ui.IntroFlow}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.openfeint.internal.Util.setOrientation(Util.java:36)
at com.openfeint.internal.ui.NestedWindow.onCreate(NestedWindow.java:32)
at com.openfeint.internal.ui.WebNav.onCreate(WebNav.java:93)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
Does any one have a solution for this??
This is a problem with your code, you can't use an object that is null. This is a hint.
I am getting this error in my application, and this happens only on UPC300-2.2 Viewsonic G-Tablet. All answers I've found so far (including this one) adviced on putting
<uses-permission android:name="android.permission.INTERNET"/>
to the manifest file, but it doesn't help.
Here is the complete stacktrace:
java.lang.NoClassDefFoundError: android.net.NetworkConnectivityListener
at
com.google.android.maps.MapActivity.onCreate(MapActivity.java:199)
at
myapp.Activity.ActivityMapSearch.onCreate(ActivityMapSearch.java:99)
at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at
android.app.ActivityThread.access$2300(ActivityThread.java:125)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at
android.os.Handler.dispatchMessage(Handler.java:99)
at
android.os.Looper.loop(Looper.java:123)
at
android.app.ActivityThread.main(ActivityThread.java:4627)
at
java.lang.reflect.Method.invokeNative(Native
Method) at
java.lang.reflect.Method.invoke(Method.java:521)
at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
at
dalvik.system.NativeStart.main(Native
Method)
If that is TRUE, you can grab the source code of the class from the Android Source and add it yourself