IBM Worklight 5.x - Android app stops and terminates unexpectedly - android

I have tried to develop a test application using Worklight for the Android environment. When I run the app using an AVD it throws an error message like:
"Sorry The application Test (process com.AccorFintech) has stopped
unexpectedly. Please try again."
and the application terminates.
I am using Eclipse 4.2 and android version for AVD is Android 2.2.
Here Is My Logcat:
07-01 16:19:33.510: W/dalvikvm(403): Unable to resolve superclass of Lcom/AccordFintech/AccordFintech; (12)
07-01 16:19:33.510: W/dalvikvm(403): Link of class 'Lcom/AccordFintech/AccordFintech;' failed
07-01 16:19:33.540: D/AndroidRuntime(403): Shutting down VM
07-01 16:19:33.540: W/dalvikvm(403): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
07-01 16:19:33.570: E/AndroidRuntime(403): FATAL EXCEPTION: main
07-01 16:19:33.570: E/AndroidRuntime(403): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.AccordFintech/com.AccordFintech.AccordFintech}: java.lang.ClassNotFoundException: com.AccordFintech.AccordFintech in loader dalvik.system.PathClassLoader[/data/app/com.AccordFintech-2.apk]
07-01 16:19:33.570: E/AndroidRuntime(403): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
07-01 16:19:33.570: E/AndroidRuntime(403): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
07-01 16:19:33.570: E/AndroidRuntime(403): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
07-01 16:19:33.570: E/AndroidRuntime(403): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
07-01 16:19:33.570: E/AndroidRuntime(403): at android.os.Handler.dispatchMessage(Handler.java:99)
07-01 16:19:33.570: E/AndroidRuntime(403): at android.os.Looper.loop(Looper.java:123)
07-01 16:19:33.570: E/AndroidRuntime(403): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-01 16:19:33.570: E/AndroidRuntime(403): at java.lang.reflect.Method.invokeNative(Native Method)
07-01 16:19:33.570: E/AndroidRuntime(403): at java.lang.reflect.Method.invoke(Method.java:521)
07-01 16:19:33.570: E/AndroidRuntime(403): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-01 16:19:33.570: E/AndroidRuntime(403): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-01 16:19:33.570: E/AndroidRuntime(403): at dalvik.system.NativeStart.main(Native Method)
07-01 16:19:33.570: E/AndroidRuntime(403): Caused by: java.lang.ClassNotFoundException: com.AccordFintech.AccordFintech in loader dalvik.system.PathClassLoader[/data/app/com.AccordFintech-2.apk]
07-01 16:19:33.570: E/AndroidRuntime(403): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
07-01 16:19:33.570: E/AndroidRuntime(403): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
07-01 16:19:33.570: E/AndroidRuntime(403): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
07-01 16:19:33.570: E/AndroidRuntime(403): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
07-01 16:19:33.570: E/AndroidRuntime(403): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
07-01 16:19:33.570: E/AndroidRuntime(403): ... 11 more

Are you using ADT v22?
See if this helps you: IBM Worklight - "Unfortunately, HelloWorkLight has stopped" error message
Right-click on the native Android project in Worklight Studio
and choose 'Properties'.
Select 'Java Build Path' and go to the 'Order and Export'
tab.
Mark the check-box for 'Android Private Libraries'
Refresh/clean/rebuild the android project.
You will need to do the above per-project.
This is fixed in Worklight 6.0.

Related

Android ClassNotFoundException after signing

I have a LibGDX game and something strange is happening. When I hit Run in Eclipse, it works fine on my phone. However, when I export a signed APK and install it, the app crashes and shows the following:
07-01 22:22:56.658: E/AndroidRuntime(12432): FATAL EXCEPTION: main
07-01 22:22:56.658: E/AndroidRuntime(12432): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.radioactivewasp.starshiprunner/com.radioactivewasp.starshiprunner.GameActivity}: java.lang.ClassNotFoundException: Didn't find class "com.radioactivewasp.starshiprunner.GameActivity" on path: /data/app/com.radioactivewasp.starshiprunner-1.apk
07-01 22:22:56.658: E/AndroidRuntime(12432): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2219)
07-01 22:22:56.658: E/AndroidRuntime(12432): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349)
07-01 22:22:56.658: E/AndroidRuntime(12432): at android.app.ActivityThread.access$700(ActivityThread.java:159)
07-01 22:22:56.658: E/AndroidRuntime(12432): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
07-01 22:22:56.658: E/AndroidRuntime(12432): at android.os.Handler.dispatchMessage(Handler.java:99)
07-01 22:22:56.658: E/AndroidRuntime(12432): at android.os.Looper.loop(Looper.java:176)
07-01 22:22:56.658: E/AndroidRuntime(12432): at android.app.ActivityThread.main(ActivityThread.java:5419)
07-01 22:22:56.658: E/AndroidRuntime(12432): at java.lang.reflect.Method.invokeNative(Native Method)
07-01 22:22:56.658: E/AndroidRuntime(12432): at java.lang.reflect.Method.invoke(Method.java:525)
07-01 22:22:56.658: E/AndroidRuntime(12432): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
07-01 22:22:56.658: E/AndroidRuntime(12432): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
07-01 22:22:56.658: E/AndroidRuntime(12432): at dalvik.system.NativeStart.main(Native Method)
07-01 22:22:56.658: E/AndroidRuntime(12432): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.radioactivewasp.starshiprunner.GameActivity" on path: /data/app/com.radioactivewasp.starshiprunner-1.apk
07-01 22:22:56.658: E/AndroidRuntime(12432): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:64)
07-01 22:22:56.658: E/AndroidRuntime(12432): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
07-01 22:22:56.658: E/AndroidRuntime(12432): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
07-01 22:22:56.658: E/AndroidRuntime(12432): at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
07-01 22:22:56.658: E/AndroidRuntime(12432): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2210)
07-01 22:22:56.658: E/AndroidRuntime(12432): ... 11 more

android VerifyError

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.

Can not find the error PHP MYSQL JSON ANDROID

Can anyone help me dissect this error log? The class throwing this is almost identical to another class that works fine in the same program. The only difference is that I have added a List and am passing parameters to the url for the json request
protected String doInBackground(String... args) {
// Building Parameters
List<NameValuePair> params = new ArrayList<NameValuePair>();
// getting JSON string from URL
//params.add(new BasicNameValuePair("category","cat"));
Line 74: JSONObject json = jParser.makeHttpRequest(url_get_channels, "GET", params);
// Check your log cat for JSON reponse
Log.d("All Products: ", json.toString());
07-01 00:17:21.573: D/dalvikvm(1009): GC_FOR_MALLOC freed 2585 objects / 167744 bytes in 78ms
07-01 00:17:28.133: W/dalvikvm(1009): threadid=9: thread exiting with uncaught exception (group=0x4001d800)
07-01 00:17:28.253: E/AndroidRuntime(1009): FATAL EXCEPTION: AsyncTask #2
07-01 00:17:28.253: E/AndroidRuntime(1009): java.lang.RuntimeException: An error occured while executing doInBackground()
07-01 00:17:28.253: E/AndroidRuntime(1009): at android.os.AsyncTask$3.done(AsyncTask.java:200)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.lang.Thread.run(Thread.java:1096)
07-01 00:17:28.253: E/AndroidRuntime(1009): Caused by: java.lang.NullPointerException
07-01 00:17:28.253: E/AndroidRuntime(1009): at com.example.video.unlimited.ListChannels$LoadAllChannels.doInBackground(ListChannels.java:74)
07-01 00:17:28.253: E/AndroidRuntime(1009): at com.example.video.unlimited.ListChannels$LoadAllChannels.doInBackground(ListChannels.java:1)
07-01 00:17:28.253: E/AndroidRuntime(1009): at android.os.AsyncTask$2.call(AsyncTask.java:185)
07-01 00:17:28.253: E/AndroidRuntime(1009): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
07-01 00:17:28.253: E/AndroidRuntime(1009): ... 4 more
07-01 00:17:29.762: E/WindowManager(1009): Activity com.example.video.unlimited.ListChannels has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#44ef2968 that was originally added here
07-01 00:17:29.762: E/WindowManager(1009): android.view.WindowLeaked: Activity com.example.video.unlimited.ListChannels has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView#44ef2968 that was originally added here
07-01 00:17:29.762: E/WindowManager(1009): at android.view.ViewRoot.<init>(ViewRoot.java:247)
07-01 00:17:29.762: E/WindowManager(1009): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
07-01 00:17:29.762: E/WindowManager(1009): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
07-01 00:17:29.762: E/WindowManager(1009): at android.view.Window$LocalWindowManager.addView(Window.java:424)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.Dialog.show(Dialog.java:241)
07-01 00:17:29.762: E/WindowManager(1009): at com.example.video.unlimited.ListChannels$LoadAllChannels.onPreExecute(ListChannels.java:63)
07-01 00:17:29.762: E/WindowManager(1009): at android.os.AsyncTask.execute(AsyncTask.java:391)
07-01 00:17:29.762: E/WindowManager(1009): at com.example.video.unlimited.ListChannels.onCreate(ListChannels.java:45)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
07-01 00:17:29.762: E/WindowManager(1009): at android.os.Handler.dispatchMessage(Handler.java:99)
07-01 00:17:29.762: E/WindowManager(1009): at android.os.Looper.loop(Looper.java:123)
07-01 00:17:29.762: E/WindowManager(1009): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-01 00:17:29.762: E/WindowManager(1009): at java.lang.reflect.Method.invokeNative(Native Method)
07-01 00:17:29.762: E/WindowManager(1009): at java.lang.reflect.Method.invoke(Method.java:521)
07-01 00:17:29.762: E/WindowManager(1009): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-01 00:17:29.762: E/WindowManager(1009): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-01 00:17:29.762: E/WindowManager(1009): at dalvik.system.NativeStart.main(Native Method)
What about the "android.view.WindowLeaked" exception?
This means that you are trying to show a Dialog from a "closed" activity.
Hope this helps
/Yaron

Android project working on Motodev but crashes on Eclipse

I made an android project on Motodev (which is an eclipse plugin itself). But now when I am trying to run the same project on eclipse, the emulator gives me an error the following error:
FATAL EXCEPTION: main E/AndroidRuntime(4711): java.lang.VerifyError: com.tenpearls.namecalling.Activities.SearchContactsActivity
E/AndroidRuntime(4711): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime(4711): at java.lang.Class.newInstance(Class.java:1429)
E/AndroidRuntime(4711): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime(4711): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
E/AndroidRuntime(4711): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime(4711): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime(4711): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime(4711): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(4711): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(4711): at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(4711): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(4711): at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(4711): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime(4711): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime(4711): at dalvik.system.NativeStart.main(Native Method)
That can be the result when you have compiled against a different library than you are using at runtime.
A good explanation can be had here.
Another possibility is having a duplicate class in the classpath somewhere, such as in a library jar.

Not working Android SmatFox Server examples

I tried to compile this example on my computer, and all apps have errors like this :
04-17 18:01:18.493: E/AndroidRuntime(271): FATAL EXCEPTION: main
04-17 18:01:18.493: E/AndroidRuntime(271): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{sfs2x.example.android.tris/sfs2x.example.android.tris.Tris}: java.lang.ClassNotFoundException: sfs2x.example.android.tris.Tris in loader dalvik.system.PathClassLoader[/data/app/sfs2x.example.android.tris-2.apk]
04-17 18:01:18.493: E/AndroidRuntime(271): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
04-17 18:01:18.493: E/AndroidRuntime(271): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-17 18:01:18.493: E/AndroidRuntime(271): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-17 18:01:18.493: E/AndroidRuntime(271): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-17 18:01:18.493: E/AndroidRuntime(271): at android.os.Handler.dispatchMessage(Handler.java:99)
04-17 18:01:18.493: E/AndroidRuntime(271): at android.os.Looper.loop(Looper.java:123)
04-17 18:01:18.493: E/AndroidRuntime(271): at android.app.ActivityThread.main(ActivityThread.java:4627)
04-17 18:01:18.493: E/AndroidRuntime(271): at java.lang.reflect.Method.invokeNative(Native Method)
04-17 18:01:18.493: E/AndroidRuntime(271): at java.lang.reflect.Method.invoke(Method.java:521)
04-17 18:01:18.493: E/AndroidRuntime(271): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-17 18:01:18.493: E/AndroidRuntime(271): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-17 18:01:18.493: E/AndroidRuntime(271): at dalvik.system.NativeStart.main(Native Method)
04-17 18:01:18.493: E/AndroidRuntime(271): Caused by: java.lang.ClassNotFoundException: sfs2x.example.android.tris.Tris in loader dalvik.system.PathClassLoader[/data/app/sfs2x.example.android.tris-2.apk]
04-17 18:01:18.493: E/AndroidRuntime(271): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
04-17 18:01:18.493: E/AndroidRuntime(271): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-17 18:01:18.493: E/AndroidRuntime(271): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-17 18:01:18.493: E/AndroidRuntime(271): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-17 18:01:18.493: E/AndroidRuntime(271): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
04-17 18:01:18.493: E/AndroidRuntime(271): ... 11 more
Download exaples from HERE
I have:
Windows 7 X64, Eclipse and Android NDK last versions.
Latest version of SmartFox server.
i found the solution to my issue was this link:
http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17
specifically this:
If you have references to jars that are not in the ‘libs’ folder, for example if you use ‘classpath variable’, you can resolve the NoClassDefFoundError issue with the new ADT 17 by exporting the references.
To export the references: simply go to “Properties > Java Build Path > Order and Export”, and check all the references you want exported.

Categories

Resources