Tutorial by Examples

From the documentation: The exception that is thrown when an application attempts to perform a networking operation on its main thread. This is only thrown for applications targeting the Honeycomb SDK or higher. Applications targeting earlier SDK versions are allowed to do networking on their ma...
This is a very common Exception. It causes your application to stop during the start or execution of your app. In the LogCat you see the message: android.content.ActivityNotFoundException : Unable to find explicit activity class; have you declared this activity in your AndroidManifest.xml? In ...
This is a runtime error that happens when you request a large amount of memory on the heap. This is common when loading a Bitmap into an ImageView. You have some options: Use a large application heap Add the "largeHeap" option to the application tag in your AndroidManifest.xml. This...
com.android.dex.DexException: Multiple dex files define Lcom/example/lib/Class; This error occurs because the app, when packaging, finds two .dex files that define the same set of methods. Usually this happens because the app has accidentally acquired 2 separate dependencies on the same library....
If you want to handle uncaught exceptions try to catch them all in onCreate method of you Application class: public class MyApp extends Application { @Override public void onCreate() { super.onCreate(); try { Thread .setDefaultUncaughtExcept...
This is how you can react to exceptions which have not been catched, similar to the system's standard "Application XYZ has crashed" import android.app.Application; import android.util.Log; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.text....

Page 1 of 1