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.
Related
Couldn't able to find the error. Logcat Provided
03-22 00:08:15.677: E/dalvikvm(275): Could not find class 'net.sourceforge.jeval.Evaluator', referenced from method com.math.Mainactivitycalculator.onCreate
03-22 00:08:15.927: E/AndroidRuntime(275): FATAL EXCEPTION: main
03-22 00:08:15.927: E/AndroidRuntime(275): java.lang.NoClassDefFoundError: net.sourceforge.jeval.Evaluator
03-22 00:08:15.927: E/AndroidRuntime(275): at com.dbl.dothemath.Mainactivitycalculator.onCreate(Mainactivitycalculator.java:76)
03-22 00:08:15.927: E/AndroidRuntime(275): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-22 00:08:15.927: E/AndroidRuntime(275): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
03-22 00:08:15.927: E/AndroidRuntime(275): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
03-22 00:08:15.927: E/AndroidRuntime(275): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
03-22 00:08:15.927: E/AndroidRuntime(275): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
03-22 00:08:15.927: E/AndroidRuntime(275): at android.os.Handler.dispatchMessage(Handler.java:99)
03-22 00:08:15.927: E/AndroidRuntime(275): at android.os.Looper.loop(Looper.java:123)
03-22 00:08:15.927: E/AndroidRuntime(275): at android.app.ActivityThread.main(ActivityThread.java:4627)
03-22 00:08:15.927: E/AndroidRuntime(275): at java.lang.reflect.Method.invokeNative(Native Method)
03-22 00:08:15.927: E/AndroidRuntime(275): at java.lang.reflect.Method.invoke(Method.java:521)
03-22 00:08:15.927: E/AndroidRuntime(275): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-22 00:08:15.927: E/AndroidRuntime(275): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-22 00:08:15.927: E/AndroidRuntime(275): at dalvik.system.NativeStart.main(Native Method)
mathematical Expression involving numbers.
Numbers are treated as doubles, so resulting numbers will contain at least one decimal place.
string String can also be added together, compared, etc...
Boolean Expression that evaluate to true (1.0) and false (0.0).
functional Custom functions can be created or there are many Math and String functions that JEval supplies with this class.
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.
i have implemented the simple listview and i get the error as
03-28 11:24:58.148: E/ArrayAdapter(275): You must supply a resource ID for a TextView
03-28 11:24:58.156: D/AndroidRuntime(275): Shutting down VM
03-28 11:24:58.156: W/dalvikvm(275): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
03-28 11:24:58.249: E/AndroidRuntime(275): FATAL EXCEPTION: main
03-28 11:24:58.249: E/AndroidRuntime(275): java.lang.IllegalStateException: ArrayAdapter requires the resource ID to be a TextView
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:347)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.AbsListView.obtainView(AbsListView.java:1315)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.ListView.measureHeightOfChildren(ListView.java:1198)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.ListView.onMeasure(ListView.java:1109)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.view.View.measure(View.java:8171)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1012)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.LinearLayout.measureVertical(LinearLayout.java:381)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.view.View.measure(View.java:8171)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.view.View.measure(View.java:8171)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.LinearLayout.measureVertical(LinearLayout.java:526)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.view.View.measure(View.java:8171)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.view.View.measure(View.java:8171)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.view.ViewRoot.performTraversals(ViewRoot.java:801)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.os.Handler.dispatchMessage(Handler.java:99)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.os.Looper.loop(Looper.java:123)
03-28 11:24:58.249: E/AndroidRuntime(275): at android.app.ActivityThread.main(ActivityThread.java:4627)
03-28 11:24:58.249: E/AndroidRuntime(275): at java.lang.reflect.Method.invokeNative(Native Method)
03-28 11:24:58.249: E/AndroidRuntime(275): at java.lang.reflect.Method.invoke(Method.java:521)
03-28 11:24:58.249: E/AndroidRuntime(275): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-28 11:24:58.249: E/AndroidRuntime(275): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-28 11:24:58.249: E/AndroidRuntime(275): at dalvik.system.NativeStart.main(Native Method)
03-28 11:24:58.249: E/AndroidRuntime(275): Caused by: java.lang.ClassCastException: android.widget.RelativeLayout
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:340)
03-28 11:24:58.249: E/AndroidRuntime(275): ... 29 more
03-28 11:24:58.249: E/AndroidRuntime(275): Caused by: java.lang.ClassCastException: android.widget.RelativeLayout
03-28 11:24:58.249: E/AndroidRuntime(275): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:340)
03-28 11:24:58.249: E/AndroidRuntime(275): ... 29 more
03-28 11:27:32.329: I/Process(275): Sending signal. PID: 275 SIG: 9
Seems you try to pass a RelativeLayout to your ArrayAdapter, where it expects a TextView. At least this is, what the exceptions say.
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.