Unable to download .jpg image and set into imageview using asynctask - android

I have a problem. I can't seem to download a .jpg image from a URL source and then set it into a imageview which is inside a listview. It gives me the error "NullPointerException". I am currently using the ImageDownloader class from here.
This are the lines of code where i download the image files:
onCreate()...
for (int i = 0; i < listData.size(); i++) {
imageISBN = listData.get(i).get("coverImage");
String isbnURL = "http://lib.syndetics.com/index.aspx?isbn=" + imageISBN +
"/SC.GIF&client=tpoly&type=xw12";
ImageView iv = (ImageView) findViewById(R.id.cover_image);
imageDownloader.download(isbnURL,iv);
}
I'm thinking that it maybe due to my setContentView(R.layout.list) that's producing the error since it is just a listview and the imageview link is in another xml file.
Below is the LogCat:
05-11 09:26:58.063: ERROR/AndroidRuntime(305): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.TPLibrary/com.TPLibrary.Search.SearchResults}: java.lang.NullPointerException
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at android.os.Handler.dispatchMessage(Handler.java:99)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at android.os.Looper.loop(Looper.java:123)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at android.app.ActivityThread.main(ActivityThread.java:4627)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at java.lang.reflect.Method.invokeNative(Native Method)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at java.lang.reflect.Method.invoke(Method.java:521)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at dalvik.system.NativeStart.main(Native Method)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): Caused by: java.lang.NullPointerException
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at com.TPLibrary.Search.ImageDownloader.forceDownload(ImageDownloader.java:80)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at com.TPLibrary.Search.ImageDownloader.download(ImageDownloader.java:49)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at com.TPLibrary.Search.SearchResults.onCreate(SearchResults.java:185)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
05-11 09:26:58.063: ERROR/AndroidRuntime(305): ... 11 more
So guys, any ideas? Could it be that i'm using the ImageDownloader class wrongly?

In ImageDownloader class, the mode is assigned to NO_ASYNC_TASK:
public enum Mode { NO_ASYNC_TASK, NO_DOWNLOADED_DRAWABLE, CORRECT }
private Mode mode = Mode.NO_ASYNC_TASK;
Your intention was to download the image. So try setting the mode variable to NO_DOWNLOADED_DRAWABLE.

Related

How to start AlertDialog regardless the context? Android

I`m doing little diagnostics project for fiscal printer in Android.
So when printing , a problem may occurs (missing paper ect.). In that case i want to start an AlertDialog notifying that there is a problem and asking the user does he wants to continue printing.
I want to make an AlertDialog that shows infront regardless the activity that is currently being brought to front.
I have tried the usual way of starting AlertDialog using GetAplicationContext() method but it crashes badly.
Here is the stacktrace:
05-11 17:36:56.162: W/dalvikvm(5458): threadid=3: thread exiting with uncaught exception (group=0x4001e390)
05-11 17:36:56.162: E/AndroidRuntime(5458): Uncaught handler: thread main exiting due to uncaught exception
05-11 17:36:56.182: E/AndroidRuntime(5458): java.lang.NullPointerException
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.content.ContextWrapper.getApplicationContext(ContextWrapper.java:100)
05-11 17:36:56.182: E/AndroidRuntime(5458): at bg.barcodes.mobile.routes.java.BaseActivity.onCreateDialog(BaseActivity.java:21)
05-11 17:36:56.182: E/AndroidRuntime(5458): at bg.barcodes.mobile.routes.java.DatecsPrinter.Send(DatecsPrinter.java:319)
05-11 17:36:56.182: E/AndroidRuntime(5458): at bg.barcodes.mobile.routes.java.DatecsPrinter.sendText(DatecsPrinter.java:381)
05-11 17:36:56.182: E/AndroidRuntime(5458): at bg.barcodes.mobile.routes.java.StatusDatecsPrinter.doCommand(StatusDatecsPrinter.java:134)
05-11 17:36:56.182: E/AndroidRuntime(5458): at bg.barcodes.mobile.routes.java.StatusDatecsPrinter.access$0(StatusDatecsPrinter.java:118)
05-11 17:36:56.182: E/AndroidRuntime(5458): at bg.barcodes.mobile.routes.java.StatusDatecsPrinter$1.onClick(StatusDatecsPrinter.java:61)
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.view.View.performClick(View.java:2364)
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.view.View.onTouchEvent(View.java:4179)
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.widget.TextView.onTouchEvent(TextView.java:6650)
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.view.View.dispatchTouchEvent(View.java:3709)
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:924)
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:924)
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:924)
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:924)
05-11 17:36:56.182: E/AndroidRuntime(5458): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1695)
05-11 17:36:56.182: E/AndroidRuntime(5458): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1116)
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.app.Activity.dispatchTouchEvent(Activity.java:2068)
05-11 17:36:56.182: E/AndroidRuntime(5458): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1679)
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.view.ViewRoot.handleMessage(ViewRoot.java:1708)
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.os.Handler.dispatchMessage(Handler.java:99)
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.os.Looper.loop(Looper.java:123)
05-11 17:36:56.182: E/AndroidRuntime(5458): at android.app.ActivityThread.main(ActivityThread.java:4595)
05-11 17:36:56.182: E/AndroidRuntime(5458): at java.lang.reflect.Method.invokeNative(Native Method)
05-11 17:36:56.182: E/AndroidRuntime(5458): at java.lang.reflect.Method.invoke(Method.java:521)
05-11 17:36:56.182: E/AndroidRuntime(5458): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
05-11 17:36:56.182: E/AndroidRuntime(5458): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
05-11 17:36:56.182: E/AndroidRuntime(5458): at dalvik.system.NativeStart.main(Native Method)
05-11 17:36:56.192: I/dalvikvm(5458): threadid=7: reacting to signal 3
05-11 17:36:56.222: I/dalvikvm(5458): Wrote stack trace to '/data/anr/traces.txt'
Any ideas ?
don't try to use getApplicationContext(), create MyApplication class, inherited from the Application, then inside that class do the following:
public class MyApplication extends Application {
private static MyApplication instance;
#Override
public void onCreate() {
super.onCreate();
instance = this;
.........
}
public static Context getContext() {
return instance;
}
After that, you may use MyApplication.getContext() anywhere if you need a context and don't have an Activity lying around.
An alert dialog is displayed on above of an Activity, that's why you need an activity's context to initialize a dialog object. So, technically its not possible to show such dialogs without having reference to activity.
There is no way to interrupt another activity when it is running. However, the sort of functionality that you are looking for would be satisfied through using notifications. This does not show a dialog in front of the running activity, but a user will still be notified when something goes wrong:
http://developer.android.com/guide/topics/ui/notifiers/notifications.html

android, delete multiple rows in sqlite

I need to delete multiple rows from my database table.
This is my code for deletion
String[] paragraph;
.....
//here you can to put various strings within it (1 or more)
.....
db.delete(mytablename,"Paragraph = ?",paragraphs);
It works with 1 string, but it doesn't work with more strings.
Can someone help me, please?
Here there is the error shown by LogCat:
05-11 11:03:01.400: E/AndroidRuntime(767): FATAL EXCEPTION: main
05-11 11:03:01.400: E/AndroidRuntime(767): android.database.sqlite.SQLiteException: bind or column index out of range: handle 0x377500
05-11 11:03:01.400: E/AndroidRuntime(767): at android.database.sqlite.SQLiteProgram.native_bind_string(Native Method)
05-11 11:03:01.400: E/AndroidRuntime(767): at android.database.sqlite.SQLiteProgram.bindString(SQLiteProgram.java:241)
05-11 11:03:01.400: E/AndroidRuntime(767): at android.database.DatabaseUtils.bindObjectToProgram(DatabaseUtils.java:191)
05-11 11:03:01.400: E/AndroidRuntime(767): at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1769)
05-11 11:03:01.400: E/AndroidRuntime(767): at it.tirocinio.Segnalibro$3$3.onClick(Segnalibro.java:196)
05-11 11:03:01.400: E/AndroidRuntime(767): at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:158)
05-11 11:03:01.400: E/AndroidRuntime(767): at android.os.Handler.dispatchMessage(Handler.java:99)
05-11 11:03:01.400: E/AndroidRuntime(767): at android.os.Looper.loop(Looper.java:123)
05-11 11:03:01.400: E/AndroidRuntime(767): at android.app.ActivityThread.main(ActivityThread.java:4627)
05-11 11:03:01.400: E/AndroidRuntime(767): at java.lang.reflect.Method.invokeNative(Native Method)
05-11 11:03:01.400: E/AndroidRuntime(767): at java.lang.reflect.Method.invoke(Method.java:521)
05-11 11:03:01.400: E/AndroidRuntime(767): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
05-11 11:03:01.400: E/AndroidRuntime(767): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
05-11 11:03:01.400: E/AndroidRuntime(767): at dalvik.system.NativeStart.main(Native Method)
use this way:
for(int i = 0 ; i < paragraphs.lenght;i++)
{
db.delete(mytablename,"Paragraph ='"+paragraphs[i]+"'",null);
}

run time error in android activity has been stopped [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How do I fix android.os.NetworkOnMainThreadException?
I just built a demo application through this tutorial and when I run the application I get the following error in log cat and the main application is stopped. Does anyone know why I am getting this error?
05-11 15:52:06.492: E/AndroidRuntime(584): FATAL EXCEPTION: main
05-11 15:52:06.492: E/AndroidRuntime(584): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.androidhive.jsonparsing/com.androidhive.jsonparsing.AndroidJSONParsingActivity}: android.os.NetworkOnMainThreadException
05-11 15:52:06.492: E/AndroidRuntime(584): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
05-11 15:52:06.492: E/AndroidRuntime(584): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
05-11 15:52:06.492: E/AndroidRuntime(584): at android.app.ActivityThread.access$600(ActivityThread.java:123)
05-11 15:52:06.492: E/AndroidRuntime(584): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
05-11 15:52:06.492: E/AndroidRuntime(584): at android.os.Handler.dispatchMessage(Handler.java:99)
05-11 15:52:06.492: E/AndroidRuntime(584): at android.os.Looper.loop(Looper.java:137)
05-11 15:52:06.492: E/AndroidRuntime(584): at android.app.ActivityThread.main(ActivityThread.java:4424)
05-11 15:52:06.492: E/AndroidRuntime(584): at java.lang.reflect.Method.invokeNative(Native Method)
05-11 15:52:06.492: E/AndroidRuntime(584): at java.lang.reflect.Method.invoke(Method.java:511)
05-11 15:52:06.492: E/AndroidRuntime(584): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-11 15:52:06.492: E/AndroidRuntime(584): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-11 15:52:06.492: E/AndroidRuntime(584): at dalvik.system.NativeStart.main(Native Method)
05-11 15:52:06.492: E/AndroidRuntime(584): Caused by: android.os.NetworkOnMainThreadException
05-11 15:52:06.492: E/AndroidRuntime(584): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1099)
05-11 15:52:06.492: E/AndroidRuntime(584): at java.net.InetAddress.lookupHostByName(InetAddress.java:391)
05-11 15:52:06.492: E/AndroidRuntime(584): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:242)
05-11 15:52:06.492: E/AndroidRuntime(584): at java.net.InetAddress.getAllByName(InetAddress.java:220)
05-11 15:52:06.492: E/AndroidRuntime(584): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
05-11 15:52:06.492: E/AndroidRuntime(584): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
05-11 15:52:06.492: E/AndroidRuntime(584): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
05-11 15:52:06.492: E/AndroidRuntime(584): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
05-11 15:52:06.492: E/AndroidRuntime(584): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
05-11 15:52:06.492: E/AndroidRuntime(584): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
05-11 15:52:06.492: E/AndroidRuntime(584): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
05-11 15:52:06.492: E/AndroidRuntime(584): at com.androidhive.jsonparsing.JSONParser.getJSONFromUrl(JSONParser.java:38)
05-11 15:52:06.492: E/AndroidRuntime(584): at com.androidhive.jsonparsing.AndroidJSONParsingActivity.onCreate(AndroidJSONParsingActivity.java:54)
05-11 15:52:06.492: E/AndroidRuntime(584): at android.app.Activity.performCreate(Activity.java:4465)
05-11 15:52:06.492: E/AndroidRuntime(584): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
05-11 15:52:06.492: E/AndroidRuntime(584): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
05-11 15:52:06.492: E/AndroidRuntime(584): ... 11 more
Rebuild the same for android target before 3.0 (such as for 2.1). Androids before 3.0 don't check if you're making network connections on main thread.
After it works as a quick fix then move your networking away from the main thread.
see: http://developer.android.com/reference/android/os/NetworkOnMainThreadException.html

I got an error during activity start [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
07-26 13:32:38.705: ERROR/Zygote(32): setreuid() failed. errno: 2
07-26 13:32:46.206: ERROR/Zygote(32): setreuid() failed. errno: 17
07-26 13:32:47.526: ERROR/BatteryService(58): usbOnlinePath not found
07-26 13:32:47.526: ERROR/BatteryService(58): batteryVoltagePath not found
07-26 13:32:47.526: ERROR/BatteryService(58): batteryTemperaturePath not found
07-26 13:32:47.556: ERROR/SurfaceFlinger(58): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
07-26 13:32:54.275: ERROR/EventHub(58): could not get driver version for /dev/input/mouse0, Not a typewriter
07-26 13:32:54.285: ERROR/EventHub(58): could not get driver version for /dev/input/mice, Not a typewriter
07-26 13:32:54.496: ERROR/System(58): Failure starting core service
07-26 13:32:54.496: ERROR/System(58): java.lang.SecurityException
07-26 13:32:54.496: ERROR/System(58): at android.os.BinderProxy.transact(Native Method)
07-26 13:32:54.496: ERROR/System(58): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
07-26 13:32:54.496: ERROR/System(58): at android.os.ServiceManager.addService(ServiceManager.java:72)
07-26 13:32:54.496: ERROR/System(58): at com.android.server.ServerThread.run(SystemServer.java:184)
07-26 13:32:55.756: ERROR/SoundPool(58): error loading /system/media/audio/ui/Effect_Tick.ogg
07-26 13:32:55.765: ERROR/SoundPool(58): error loading /system/media/audio/ui/KeypressStandard.ogg
07-26 13:32:55.775: ERROR/SoundPool(58): error loading /system/media/audio/ui/KeypressSpacebar.ogg
07-26 13:32:55.795: ERROR/SoundPool(58): error loading /system/media/audio/ui/KeypressDelete.ogg
07-26 13:32:55.804: ERROR/SoundPool(58): error loading /system/media/audio/ui/KeypressReturn.ogg
07-26 13:32:59.184: ERROR/ThrottleService(58): Could not open GPS configuration file /etc/gps.conf
07-26 13:33:00.706: ERROR/logwrapper(148): executing /system/bin/tc failed: No such file or directory
07-26 13:33:00.764: ERROR/logwrapper(149): executing /system/bin/tc failed: No such file or directory
07-26 13:33:00.815: ERROR/logwrapper(150): executing /system/bin/tc failed: No such file or directory
07-26 13:33:12.188: ERROR/HierarchicalStateMachine(58): TetherMaster - unhandledMessage: msg.what=3
07-26 13:34:04.617: ERROR/AndroidRuntime(276): FATAL EXCEPTION: main
07-26 13:34:04.617: ERROR/AndroidRuntime(276): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dataApplication/com.dataApplication.Edit}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at android.os.Handler.dispatchMessage(Handler.java:99)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at android.os.Looper.loop(Looper.java:123)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at java.lang.reflect.Method.invokeNative(Native Method)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at java.lang.reflect.Method.invoke(Method.java:521)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at dalvik.system.NativeStart.main(Native Method)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list'
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at android.app.ListActivity.onContentChanged(ListActivity.java:245)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:201)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at android.app.Activity.setContentView(Activity.java:1647)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at com.dataApplication.Edit.onCreate(Edit.java:32)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
07-26 13:34:04.617: ERROR/AndroidRuntime(276): ... 11 more
java.lang.RuntimeException:
Your content must have a ListView whose id attribute is 'android.R.id.list'
Make sure your view file has a ListView element, with android:id="#android:id/list".
This is how the ListActivity knows where to display the data you're adding.
From http://developer.android.com/reference/android/app/ListActivity.html
ListActivity has a default layout that consists of a single, full-screen list in the center of the screen. However, if you desire, you can customize the screen layout by setting your own view layout with setContentView() in onCreate(). To do this, your own view MUST contain a ListView object with the id "#android:id/list" (or list if it's in code)
Check if you have "#android:id/list" in your xml ?

I get an error during database insertion

when im going to insert the the data in database i found the following errors
please give me solution
07-26 12:24:38.275: ERROR/Zygote(32): setreuid() failed. errno: 2
07-26 12:24:45.445: ERROR/Zygote(32): setreuid() failed. errno: 17
07-26 12:24:46.705: ERROR/BatteryService(58): usbOnlinePath not found
07-26 12:24:46.705: ERROR/BatteryService(58): batteryVoltagePath not found
07-26 12:24:46.705: ERROR/BatteryService(58): batteryTemperaturePath not found
07-26 12:24:46.757: ERROR/SurfaceFlinger(58): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
07-26 12:24:52.576: ERROR/EventHub(58): could not get driver version for /dev/input/mouse0, Not a typewriter
07-26 12:24:52.576: ERROR/EventHub(58): could not get driver version for /dev/input/mice, Not a typewriter
07-26 12:24:52.727: ERROR/System(58): Failure starting core service
07-26 12:24:52.727: ERROR/System(58): java.lang.SecurityException
07-26 12:24:52.727: ERROR/System(58): at android.os.BinderProxy.transact(Native Method)
07-26 12:24:52.727: ERROR/System(58): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
07-26 12:24:52.727: ERROR/System(58): at android.os.ServiceManager.addService(ServiceManager.java:72)
07-26 12:24:52.727: ERROR/System(58): at com.android.server.ServerThread.run(SystemServer.java:184)
07-26 12:24:53.727: ERROR/SoundPool(58): error loading /system/media/audio/ui/Effect_Tick.ogg
07-26 12:24:53.737: ERROR/SoundPool(58): error loading /system/media/audio/ui/KeypressStandard.ogg
07-26 12:24:53.737: ERROR/SoundPool(58): error loading /system/media/audio/ui/KeypressSpacebar.ogg
07-26 12:24:53.737: ERROR/SoundPool(58): error loading /system/media/audio/ui/KeypressDelete.ogg
07-26 12:24:53.746: ERROR/SoundPool(58): error loading /system/media/audio/ui/KeypressReturn.ogg
07-26 12:24:56.527: ERROR/ThrottleService(58): Could not open GPS configuration file /etc/gps.conf
07-26 12:24:57.955: ERROR/logwrapper(142): executing /system/bin/tc failed: No such file or directory
07-26 12:24:58.026: ERROR/logwrapper(144): executing /system/bin/tc failed: No such file or directory
07-26 12:24:58.096: ERROR/logwrapper(146): executing /system/bin/tc failed: No such file or directory
07-26 12:25:10.246: ERROR/HierarchicalStateMachine(58): TetherMaster - unhandledMessage: msg.what=3
07-26 12:25:41.245: ERROR/AndroidRuntime(274): FATAL EXCEPTION: main
07-26 12:25:41.245: ERROR/AndroidRuntime(274): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dataApplication/com.dataApplication.Edit}: java.lang.NullPointerException
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at android.os.Handler.dispatchMessage(Handler.java:99)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at android.os.Looper.loop(Looper.java:123)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at java.lang.reflect.Method.invokeNative(Native Method)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at java.lang.reflect.Method.invoke(Method.java:521)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at dalvik.system.NativeStart.main(Native Method)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): Caused by: java.lang.NullPointerException
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at com.dataApplication.Edit.onCreate(Edit.java:87)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
07-26 12:25:41.245: ERROR/AndroidRuntime(274): ... 11 more
07-26 12:26:54.735: ERROR/AndroidRuntime(285): FATAL EXCEPTION: main
07-26 12:26:54.735: ERROR/AndroidRuntime(285): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dataApplication/com.dataApplication.Edit}: java.lang.NullPointerException
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at android.os.Handler.dispatchMessage(Handler.java:99)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at android.os.Looper.loop(Looper.java:123)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at java.lang.reflect.Method.invokeNative(Native Method)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at java.lang.reflect.Method.invoke(Method.java:521)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at dalvik.system.NativeStart.main(Native Method)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): Caused by: java.lang.NullPointerException
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at com.dataApplication.Edit.onCreate(Edit.java:87)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
07-26 12:26:54.735: ERROR/AndroidRuntime(285): ... 11 more
I think the error you got is:
07-26 12:25:41.245: ERROR/AndroidRuntime(274): Caused by: java.lang.NullPointerException
07-26 12:25:41.245: ERROR/AndroidRuntime(274): at com.dataApplication.Edit.onCreate(Edit.java:87)
You are accessing a object that is not existing on line 87 in your Edit class.

Categories

Resources