In my app there is one activity I have where I call onDestroy and inside it I have the following:
#Override
public void onDestroy()
{
productAdapter.imageLoader.stopThread();
lvProducts.setAdapter(null);
super.onDestroy();
}
productAdapter is my ListView adapter and I am using the fedorvlasov lazy load functionality.
The issue is, when I leave the app for a LONG time and come back, I try to access this activity from the main activity and I get the following:
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): FATAL EXCEPTION: main
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): java.lang.RuntimeException: Unable to destroy activity {com.MyApp/com.MyApp.Products}: java.lang.NullPointerException
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3081)
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:3146)
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at android.app.ActivityThread.access$2100(ActivityThread.java:132)
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1071)
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at android.os.Handler.dispatchMessage(Handler.java:99)
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at android.os.Looper.loop(Looper.java:150)
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at android.app.ActivityThread.main(ActivityThread.java:4263)
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at java.lang.reflect.Method.invokeNative(Native Method)
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at java.lang.reflect.Method.invoke(Method.java:507)
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at dalvik.system.NativeStart.main(Native Method)
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): Caused by: java.lang.NullPointerException
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at com.MyApp.Productss.onDestroy(DailyDeals.java:678)
03-22 09:15:17.684: ERROR/AndroidRuntime(28442): at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:3063)
The thing is, I dont know how to reproduce this because it only happens if I leave the app for a long time and come back. Its almost like there is an Android timeout that says after this many hours, cause app to start over.
The system will kill your application whenever it needs the resources to use for something else. This is why when you come back after a long time it is no longer running.
why do you have this line?
lvProducts.setAdapter(null);
I think that is what is giving you a null pointer. It isn't liking that you are trying to set it with a null adapter. Try removing this line
Also just to be sure, which line is 678?
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.
I have used this link to preform videoChat.However, it gives me java.lang.NoClassDefFoundError which cannot locate : com.quickblox.module.chat.smack.SmackAndroid class .I tried changing the preferences of libraries but din't helped.
Here is the log:
03-22 18:14:21.476: I/dalvikvm(9908): Could not find method com.quickblox.module.chat.smack.SmackAndroid.init, referenced from method com.quickblox.videochatsample.ui.App.onCreate
03-22 18:14:21.476: W/dalvikvm(9908): VFY: unable to resolve static method 50: Lcom/quickblox/module/chat/smack/SmackAndroid;.init (Landroid/content/Context;)Lcom/quickblox/module/chat/smack/SmackAndroid;
03-22 18:14:21.476: D/dalvikvm(9908): VFY: replacing opcode 0x71 at 0x0003
03-22 18:14:21.481: D/AndroidRuntime(9908): Shutting down VM
03-22 18:14:21.481: W/dalvikvm(9908): threadid=1: thread exiting with uncaught exception (group=0x41927700)
03-22 18:14:21.486: E/AndroidRuntime(9908): FATAL EXCEPTION: main
03-22 18:14:21.486: E/AndroidRuntime(9908): java.lang.NoClassDefFoundError: com.quickblox.module.chat.smack.SmackAndroid
03-22 18:14:21.486: E/AndroidRuntime(9908): at com.quickblox.videochatsample.ui.App.onCreate(App.java:13)
03-22 18:14:21.486: E/AndroidRuntime(9908): at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
03-22 18:14:21.486: E/AndroidRuntime(9908): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4684)
03-22 18:14:21.486: E/AndroidRuntime(9908): at android.app.ActivityThread.access$1400(ActivityThread.java:159)
03-22 18:14:21.486: E/AndroidRuntime(9908): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1376)
03-22 18:14:21.486: E/AndroidRuntime(9908): at android.os.Handler.dispatchMessage(Handler.java:99)
03-22 18:14:21.486: E/AndroidRuntime(9908): at android.os.Looper.loop(Looper.java:137)
03-22 18:14:21.486: E/AndroidRuntime(9908): at android.app.ActivityThread.main(ActivityThread.java:5419)
03-22 18:14:21.486: E/AndroidRuntime(9908): at java.lang.reflect.Method.invokeNative(Native Method)
03-22 18:14:21.486: E/AndroidRuntime(9908): at java.lang.reflect.Method.invoke(Method.java:525)
03-22 18:14:21.486: E/AndroidRuntime(9908): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)
03-22 18:14:21.486: E/AndroidRuntime(9908): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
03-22 18:14:21.486: E/AndroidRuntime(9908): at dalvik.system.NativeStart.main(Native Method)
go to build path and click on add external jar and add quickbox-android-1.2.2.jar
and go to Order and Export tab and check jarfile checkbox.and clean and rebuild project thats it...
i am testing the sdk samples app from alfresco android sdk under a AVD, i am using alfresco community edition 4.2, when i enter a wrong Hostname i get the message "failed to log in. please check your settings", but when i enter the correct host name, the app crashes and i get the message "Unfortunately, SDK Samples has stopped." then it restarts...
there is this one time, i entered the correct host name and the app connected to the alfresco server without any problem, but when i tried a second time the problem persists
any idea what could be the problem?!!
LogCat
03-22 19:33:53.584: I/dalvikvm-heap(811): Grow heap (frag case) to 7.083MB for 108752-byte allocation
03-22 19:33:53.624: D/dalvikvm(811): GC_FOR_ALLOC freed 53K, 10% free 7153K/7879K, paused 37ms, total 37ms
03-22 19:33:53.814: D/dalvikvm(811): GC_CONCURRENT freed 434K, 9% free 7216K/7879K, paused 15ms+28ms, total 96ms
03-22 19:33:53.844: D/AndroidRuntime(811): Shutting down VM
03-22 19:33:53.844: W/dalvikvm(811): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
03-22 19:33:53.894: E/AndroidRuntime(811): FATAL EXCEPTION: main
03-22 19:33:53.894: E/AndroidRuntime(811): java.lang.RuntimeException: Parcelable encountered IOException writing serializable object (name = org.apache.chemistry.opencmis.client.runtime.SessionImpl)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.os.Parcel.writeSerializable(Parcel.java:1279)
03-22 19:33:53.894: E/AndroidRuntime(811): at org.alfresco.mobile.android.api.session.impl.RepositorySessionImpl.writeToParcel(RepositorySessionImpl.java:219)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.os.Parcel.writeParcelable(Parcel.java:1254)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.os.Parcel.writeValue(Parcel.java:1173)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.os.Parcel.writeMapInternal(Parcel.java:591)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.os.Bundle.writeToParcel(Bundle.java:1619)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.os.Parcel.writeBundle(Parcel.java:605)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.content.Intent.writeToParcel(Intent.java:6470)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1741)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1411)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.app.Activity.startActivityForResult(Activity.java:3351)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.app.Activity.startActivityForResult(Activity.java:3312)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.app.Activity.startActivity(Activity.java:3522)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.app.Activity.startActivity(Activity.java:3490)
03-22 19:33:53.894: E/AndroidRuntime(811): at org.alfresco.mobile.android.samples.activity.SessionLoaderCallback.onLoadFinished(SessionLoaderCallback.java:191)
03-22 19:33:53.894: E/AndroidRuntime(811): at org.alfresco.mobile.android.samples.activity.SessionLoaderCallback.onLoadFinished(SessionLoaderCallback.java:1)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.app.LoaderManagerImpl$LoaderInfo.callOnLoadFinished(LoaderManager.java:482)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.app.LoaderManagerImpl$LoaderInfo.onLoadComplete(LoaderManager.java:450)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.content.Loader.deliverResult(Loader.java:143)
03-22 19:33:53.894: E/AndroidRuntime(811): at org.alfresco.mobile.android.api.asynchronous.AbstractBaseLoader.deliverResult(AbstractBaseLoader.java:65)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.content.AsyncTaskLoader.dispatchOnLoadComplete(AsyncTaskLoader.java:254)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.content.AsyncTaskLoader$LoadTask.onPostExecute(AsyncTaskLoader.java:91)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.os.AsyncTask.finish(AsyncTask.java:631)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.os.AsyncTask.access$600(AsyncTask.java:177)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.os.Handler.dispatchMessage(Handler.java:99)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.os.Looper.loop(Looper.java:137)
03-22 19:33:53.894: E/AndroidRuntime(811): at android.app.ActivityThread.main(ActivityThread.java:4745)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.lang.reflect.Method.invokeNative(Native Method)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.lang.reflect.Method.invoke(Method.java:511)
03-22 19:33:53.894: E/AndroidRuntime(811): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
03-22 19:33:53.894: E/AndroidRuntime(811): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
03-22 19:33:53.894: E/AndroidRuntime(811): at dalvik.system.NativeStart.main(Native Method)
03-22 19:33:53.894: E/AndroidRuntime(811): Caused by: java.io.NotSerializableException: org.alfresco.cmis.client.impl.AlfrescoAspectsImpl
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1364)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1671)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1517)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1481)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeFieldValues(ObjectOutputStream.java:979)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:368)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1074)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1404)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1671)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1517)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1481)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.util.HashMap.writeObject(HashMap.java:1013)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.lang.reflect.Method.invokeNative(Native Method)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.lang.reflect.Method.invoke(Method.java:511)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeHierarchy(ObjectOutputStream.java:1053)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeNewObject(ObjectOutputStream.java:1404)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeObjectInternal(ObjectOutputStream.java:1671)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1517)
03-22 19:33:53.894: E/AndroidRuntime(811): at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:1481)
03-22 19:33:53.894: E/AndroidRuntime(811): at org.apache.chemistry.opencmis.client.runtime.cache.CacheImpl$CacheItem.writeObject(Cach
03-22 19:33:57.344: I/Process(811): Sending signal. PID: 811 SIG: 9
03-22 19:33:57.874: E/Trace(867): error opening trace file: No such file or directory (2)
03-22 19:33:58.514: D/dalvikvm(867): GC_CONCURRENT freed 219K, 5% free 6215K/6535K, paused 16ms+4ms, total 80ms
03-22 19:33:58.564: I/Choreographer(867): Skipped 35 frames! The application may be doing too much work on its main thread.
03-22 19:33:58.574: D/gralloc_goldfish(867): Emulator without GPU emulation detected.
03-22 19:33:58.695: I/Choreographer(867): Skipped 51 frames! The application may be doing too much work on its main thread.
This error was due to a bug inside a dependency used by Alfresco Mobile SDK Sample.
This error has been fixed by the release of alfresco-opencmis-extension 0.7-ANDROID and in general by the release of Alfresco Mobile SDK 1.3.1.
The code in my book created a NPE for me to see. But, when I open the logcat in ddms, I cannot see all the errors (it says 11 more). How do I see all the exceptions ? Please see the photo below -
EDIT - Image for full trace posted. Also posting text of trace by copy pasting.
Image -
D/QuizActivity(836): onCreate(Bundle) called
D/AndroidRuntime(836): Shutting down VM
W/dalvikvm(836): threadid=1: thread exiting with uncaught exception (group=0x41465700)
E/AndroidRuntime(836): FATAL EXCEPTION: main
E/AndroidRuntime(836): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bignerdranch.android.geoquiz/com.bignerdranch.android.geoquiz.QuizActivity}: java.lang.NullPointerException
E/AndroidRuntime(836): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
E/AndroidRuntime(836): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
E/AndroidRuntime(836): at android.app.ActivityThread.access$600(ActivityThread.java:141)
E/AndroidRuntime(836): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
E/AndroidRuntime(836): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(836): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(836): at android.app.ActivityThread.main(ActivityThread.java:5103)
E/AndroidRuntime(836): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(836): at java.lang.reflect.Method.invoke(Method.java:525)
E/AndroidRuntime(836): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
E/AndroidRuntime(836): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime(836): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime(836): Caused by: java.lang.NullPointerException
E/AndroidRuntime(836): at com.bignerdranch.android.geoquiz.QuizActivity.updateQuestion(QuizActivity.java:47)
E/AndroidRuntime(836): at com.bignerdranch.android.geoquiz.QuizActivity.onCreate(QuizActivity.java:111)
E/AndroidRuntime(836): at android.app.Activity.performCreate(Activity.java:5133)
E/AndroidRuntime(836): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime(836): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
E/AndroidRuntime(836): ... 11 more
You dont usually need the whole stack trace, the main thing to look for is "caused by" message and the class(TAG) which is causing the exception
Use try catch block and Java Doc
printStackTrace to see the full stack trace.
try {
// Expected Exception Rasing Line
} catch (Exception e) {
e.printStackTrace();
}
I read a lot about this issue but I still can´t do it work.
I have two projects: one does some stuff and what I want to do is set it as jar file and use it in the main project, call it and take the info I don´t know how to instanciate a class of that package to start with the process. The secondary project works fine alone and I want to take the info and use it in the main project. If I set the secondary as Library and add it to the main it works fine but I don´t want to do it in this way.
I think it´s possible to do it but I don´t know how to instantiate a class from a jar file and I´m starting to be desperate.
this is the logCat when I call the activity in the jared
file 03-22 11:04:57.900: E/AndroidRuntime(11895): FATAL EXCEPTION: main
03-22 11:04:57.900: E/AndroidRuntime(11895): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.example.suscribir/com.example.suscribir.Suscribir}; have you declared this activity in your AndroidManifest.xml?
03-22 11:04:57.900: E/AndroidRuntime(11895): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1405)
03-22 11:04:57.900: E/AndroidRuntime(11895): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
03-22 11:04:57.900: E/AndroidRuntime(11895): at android.app.Activity.startActivityForResult(Activity.java:2827)
03-22 11:04:57.900: E/AndroidRuntime(11895): at android.app.Activity.startActivity(Activity.java:2933)
03-22 11:04:57.900: E/AndroidRuntime(11895): at com.example.principal.Principal$1.onClick(Principal.java:37)
03-22 11:04:57.900: E/AndroidRuntime(11895): at android.view.View.performClick(View.java:2485)
03-22 11:04:57.900: E/AndroidRuntime(11895): at android.view.View$PerformClick.run(View.java:9080)
03-22 11:04:57.900: E/AndroidRuntime(11895): at android.os.Handler.handleCallback(Handler.java:587)
03-22 11:04:57.900: E/AndroidRuntime(11895): at android.os.Handler.dispatchMessage(Handler.java:92)
03-22 11:04:57.900: E/AndroidRuntime(11895): at android.os.Looper.loop(Looper.java:130)
03-22 11:04:57.900: E/AndroidRuntime(11895): at android.app.ActivityThread.main(ActivityThread.java:3687)
03-22 11:04:57.900: E/AndroidRuntime(11895): at java.lang.reflect.Method.invokeNative(Native Method)
03-22 11:04:57.900: E/AndroidRuntime(11895): at java.lang.reflect.Method.invoke(Method.java:507)
03-22 11:04:57.900: E/AndroidRuntime(11895): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
03-22 11:04:57.900: E/AndroidRuntime(11895): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
03-22 11:04:57.900: E/AndroidRuntime(11895): at dalvik.system.NativeStart.main(Native Method)
this is how I call the Activity with an intent
intent.setAction(Intent.ACTION_MAIN);
intent.setClassName("com.example.suscribir", "com.example.suscribir.Suscribir");
startActivity(intent);
this is the Manifest
<activity
android:name="com.example.suscribir.Suscribir">
</activity>
If you need more info, just tell me
Thanks again
http://androiddevelopement.blogspot.in/2011/01/creating-jar-file-in-eclipse.html.
Creating jar from eclipse
Cannot package resources, manifest entries. Pure Java code (perhaps using Android APIs), can be packaged into jars.
To use it , just copy the jar to your libs folder under the project.
Right click on project. Goto Properties. Java Build Path. Click Add Jars. Add jar from your libs folder.
After that you can use import statement and instantiate it in your new project class.
I'm not completely sure if I understand your question right. You have two Android applications that use the same classes? Is that right? You need to extract the common classes into a Library project in that case. I don't think that you can reference one Android Application project from another.
Finally, I found a way to use a project into another as library. This tuto is in Spanish byt is really easy following the images in each step
http://es.slideshare.net/ajdgeniz/como-hacer-un-archivo-jar-en-eclipse