Android Error when closing the application - android

I have an android programm which manage a database. It this database, I write the sensor values of my device.
When close the application with the home button, i have a force close error.
Here is my logcat, can you please help me, thank you.
`12-27 10:45:20.827: D/AndroidRuntime(1053): Shutting down VM
12-27 10:45:20.827: W/dalvikvm(1053): threadid=1: thread exiting with uncaught exception (group=0x40014760)
12-27 10:45:20.942: E/AndroidRuntime(1053): FATAL EXCEPTION: main
12-27 10:45:20.942: E/AndroidRuntime(1053): java.lang.NullPointerException
12-27 10:45:20.942: E/AndroidRuntime(1053): at android.database.sqlite.SQLiteStatement.releaseAndUnlock(SQLiteStatement.java:283)
12-27 10:45:20.942: E/AndroidRuntime(1053): at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:116)
12-27 10:45:20.942: E/AndroidRuntime(1053): at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1732)
12-27 10:45:20.942: E/AndroidRuntime(1053): at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1605)
12-27 10:45:20.942: E/AndroidRuntime(1053): at milos.stationdemesure.CapteursBDD.insertValeursCapteur(CapteursBDD.java:69)
12-27 10:45:20.942: E/AndroidRuntime(1053): at milos.stationdemesure.EssaisCapteurs.onProximityChanged(EssaisCapteurs.java:454)
12-27 10:45:20.942: E/AndroidRuntime(1053): at milos.stationdemesure.EssaisCapteurs.onSensorChanged(EssaisCapteurs.java:354)
12-27 10:45:20.942: E/AndroidRuntime(1053): at android.hardware.SensorManager$ListenerDelegate$1.handleMessage(SensorManager.java:529)
12-27 10:45:20.942: E/AndroidRuntime(1053): at android.os.Handler.dispatchMessage(Handler.java:99)
12-27 10:45:20.942: E/AndroidRuntime(1053): at android.os.Looper.loop(Looper.java:126)
12-27 10:45:20.942: E/AndroidRuntime(1053): at android.app.ActivityThread.main(ActivityThread.java:3997)
12-27 10:45:20.942: E/AndroidRuntime(1053): at java.lang.reflect.Method.invokeNative(Native Method)
12-27 10:45:20.942: E/AndroidRuntime(1053): at java.lang.reflect.Method.invoke(Method.java:491)
12-27 10:45:20.942: E/AndroidRuntime(1053): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
12-27 10:45:20.942: E/AndroidRuntime(1053): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
12-27 10:45:20.942: E/AndroidRuntime(1053): at dalvik.system.NativeStart.main(Native Method)
`

I feel the issue is either database instance or any other object became null but you are calling some method using that object. Always check for null before using any methods of any object. see the sample example
example
if(database != null){
database.close();
}

Looks similar to this issue: SQLiteDatabase close() function causing NullPointerException when multiple threads
You may not need to call database.close()

Related

findViewById on an ImageView why does setBackgroundColor give NullPointerException

I have a very basic activity with an ImageView of android:id="#+id/imageViewTest"
and then in the OnCreate method calling:
ImageView imageView = (ImageView)findViewById(R.id.imageViewTest);
// Set the background color to white
imageView.setBackgroundColor(Color.WHITE);
this gives error:
10-15 16:36:27.552 29097-29097/org.explore.self.beginner D/dalvikvm﹕ Late-enabling CheckJNI
10-15 16:36:28.017 29097-29097/org.explore.self.beginner D/AndroidRuntime﹕ Shutting down VM
10-15 16:36:28.017 29097-29097/org.explore.self.beginner W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41d9b2a0)
10-15 16:36:28.042 29097-29097/org.explore.self.beginner E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.explore.self.beginner/org.selfexplore.android.view.activity.TestActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2110)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
at android.app.ActivityThread.access$700(ActivityThread.java:140)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at org.selfexplore.android.view.activity.TestActivity.onCreate(TestActivity.java:37)
at android.app.Activity.performCreate(Activity.java:5188)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
            at android.app.ActivityThread.access$700(ActivityThread.java:140)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4921)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
            at dalvik.system.NativeStart.main(Native Method)
10-15 16:36:28.062 29097-29097/org.explore.self.beginner I/Process﹕ Sending signal. PID: 29097 SIG: 9
But when I do a
ImageView imageView = new ImageView(this);
it works fine, Why?
PS: I am not able to add the layout code here, so sharing it in this doc: https://docs.google.com/document/d/1fbi3B_hAYUh_C2IwPfInvZ-BG2bgsa4pZoJKj8NBT9o/edit?usp=sharing
Your layout you've set with setContentView() doesn't have a view with id imageViewTest and findViewById() returns null, or you haven't called setContentView() at all.

how to Extending the WebView correctly?

I'm using solution of Scroll webview horizontally inside a ViewPager
it's looks very useful, I was reference ExtendedWebView in xml,
<ExtendedWebView
android:id="#+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
instance ExtendedWebView in .class,
LayoutInflater mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
layout = mInflater.inflate(R.layout.lay1, null);
ExtendedWebView webView = (ExtendedWebView)layout.findViewById(R.id.webview);
but i got 'Error inflating class ExtendedWebView', so could anybody to help me to give me some ideas, thanks for your time and experience!
heres are entire stack trace,
12-27 22:14:44.263: E/AndroidRuntime(10824): FATAL EXCEPTION: main
12-27 22:14:44.263: E/AndroidRuntime(10824): android.view.InflateException: Binary XML file line #7: Error inflating class com.vv_package_name.ExtendedWebView
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
12-27 22:14:44.263: E/AndroidRuntime(10824): at com.vv_package_name.vv_main$ExtendedPagerAdapter.instantiateItem(vv_main.java:135)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.support.v4.view.PagerAdapter.instantiateItem(PagerAdapter.java:110)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:801)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.support.v4.view.ViewPager.populate(ViewPager.java:930)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.support.v4.view.ViewPager.populate(ViewPager.java:881)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1366)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.View.measure(View.java:8226)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.widget.LinearLayout.measureVertical(LinearLayout.java:526)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.View.measure(View.java:8226)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.View.measure(View.java:8226)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.widget.LinearLayout.measureVertical(LinearLayout.java:526)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.widget.LinearLayout.onMeasure(LinearLayout.java:304)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.View.measure(View.java:8226)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:3132)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.widget.FrameLayout.onMeasure(FrameLayout.java:245)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.View.measure(View.java:8226)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.ViewRoot.performTraversals(ViewRoot.java:801)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.os.Handler.dispatchMessage(Handler.java:99)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.os.Looper.loop(Looper.java:123)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.app.ActivityThread.main(ActivityThread.java:4627)
12-27 22:14:44.263: E/AndroidRuntime(10824): at java.lang.reflect.Method.invokeNative(Native Method)
12-27 22:14:44.263: E/AndroidRuntime(10824): at java.lang.reflect.Method.invoke(Method.java:521)
12-27 22:14:44.263: E/AndroidRuntime(10824): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
12-27 22:14:44.263: E/AndroidRuntime(10824): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
12-27 22:14:44.263: E/AndroidRuntime(10824): at dalvik.system.NativeStart.main(Native Method)
12-27 22:14:44.263: E/AndroidRuntime(10824): Caused by: java.lang.ClassNotFoundException: com.vv_package_name.ExtendedWebView in loader dalvik.system.PathClassLoader[/data/app/com.vv_package_name-2.apk]
12-27 22:14:44.263: E/AndroidRuntime(10824): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
12-27 22:14:44.263: E/AndroidRuntime(10824): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
12-27 22:14:44.263: E/AndroidRuntime(10824): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
12-27 22:14:44.263: E/AndroidRuntime(10824): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
12-27 22:14:44.263: E/AndroidRuntime(10824): ... 33 more
if using WebView instead of ExtendedWebView, my code is working fine :)
You need to provide a full reference to the class, including the package.
For instance,
<org.example.myapp.ExtendedWebView
android:id="#+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
sorry i'm a noob, it's my problem, i put these extend webview code in main Activity class in one .class file...it should be save with a standalone .class file...:)
public class ExtendedWebView extends WebView {
Solved for me by using this in my XML:
<view
class="com.example.MainActivity$MyWebView"
android:id="#+id/web_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

Android: App stops working after requesting location updates in android simulator

My app stopped working after requesting location updates in android emulator. This happens only for android versions over 3.0.
Any code like the following
lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER, 0, 0, locationListener);
the app stops working. Is this a regular behavior in simulator for these versions or am I doing something wrong?
More info: If I launch the simulator for android 2.3 or less, the exceptions are being caught properly. This is not happening in the other versions.
12-27 19:17:59.183: W/dalvikvm(640): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
12-27 19:17:59.253: E/AndroidRuntime(640): FATAL EXCEPTION: main
12-27 19:17:59.253: E/AndroidRuntime(640): android.os.NetworkOnMainThreadException
12-27 19:17:59.253: E/AndroidRuntime(640): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
12-27 19:17:59.253: E/AndroidRuntime(640): at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
12-27 19:17:59.253: E/AndroidRuntime(640): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
12-27 19:17:59.253: E/AndroidRuntime(640): at java.net.InetAddress.getAllByName(InetAddress.java:214)
12-27 19:17:59.253: E/AndroidRuntime(640): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
12-27 19:17:59.253: E/AndroidRuntime(640): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
12-27 19:17:59.253: E/AndroidRuntime(640): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
12-27 19:17:59.253: E/AndroidRuntime(640): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
12-27 19:17:59.253: E/AndroidRuntime(640): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
12-27 19:17:59.253: E/AndroidRuntime(640): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
12-27 19:17:59.253: E/AndroidRuntime(640): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
12-27 19:17:59.253: E/AndroidRuntime(640): at com.rahul.places.AddNewLocation.getUrlArray(AddNewLocation.java:147)
12-27 19:17:59.253: E/AndroidRuntime(640): at com.rahul.places.AddNewLocation.access$6(AddNewLocation.java:139)
12-27 19:17:59.253: E/AndroidRuntime(640): at com.rahul.places.AddNewLocation$2.onClick(AddNewLocation.java:69)
12-27 19:17:59.253: E/AndroidRuntime(640): at android.view.View.performClick(View.java:4084)
12-27 19:17:59.253: E/AndroidRuntime(640): at android.view.View$PerformClick.run(View.java:16966)
12-27 19:17:59.253: E/AndroidRuntime(640): at android.os.Handler.handleCallback(Handler.java:615)
12-27 19:17:59.253: E/AndroidRuntime(640): at android.os.Handler.dispatchMessage(Handler.java:92)
12-27 19:17:59.253: E/AndroidRuntime(640): at android.os.Looper.loop(Looper.java:137)
12-27 19:17:59.253: E/AndroidRuntime(640): at android.app.ActivityThread.main(ActivityThread.java:4745)
12-27 19:17:59.253: E/AndroidRuntime(640): at java.lang.reflect.Method.invokeNative(Native Method)
12-27 19:17:59.253: E/AndroidRuntime(640): at java.lang.reflect.Method.invoke(Method.java:511)
12-27 19:17:59.253: E/AndroidRuntime(640): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
12-27 19:17:59.253: E/AndroidRuntime(640): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-27 19:17:59.253: E/AndroidRuntime(640): at dalvik.system.NativeStart.main(Native Method)
This is expected. Android is much more strict in dealing with work on the UI thread in more recent versions.
The solution is to use a handler to change the UI on the UI thread when location updates are available (that is in your onLocationChanged() method).

After starting activity the activity crashes. Textview and string involved

i have a spinner and when you select an item from the spinner a text from a string should show in the textView, (txtdescription1) but when i start the activity it crashes.
i have tested a lot of thing but i dont find a error in the code.
Resources res = getResources();
int[] txt = res.getIntArray(R.array.description);
public void onItemSelected(AdapterView<?> parent, View v, int position,
long id) {
txtdescription1.setText(txt[position]);
}
Here is the LogCat
12-27 00:37:24.895: E/AndroidRuntime(1267): FATAL EXCEPTION: main
12-27 00:37:24.895: E/AndroidRuntime(1267): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.alpha.liveshit/com.alpha.liveshit.Sample}: java.lang.NullPointerException
12-27 00:37:24.895: E/AndroidRuntime(1267): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
12-27 00:37:24.895: E/AndroidRuntime(1267): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
12-27 00:37:24.895: E/AndroidRuntime(1267): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
12-27 00:37:24.895: E/AndroidRuntime(1267): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
12-27 00:37:24.895: E/AndroidRuntime(1267): at android.os.Handler.dispatchMessage(Handler.java:99)
12-27 00:37:24.895: E/AndroidRuntime(1267): at android.os.Looper.loop(Looper.java:123)
12-27 00:37:24.895: E/AndroidRuntime(1267): at android.app.ActivityThread.main(ActivityThread.java:4627)
12-27 00:37:24.895: E/AndroidRuntime(1267): at java.lang.reflect.Method.invokeNative(Native Method)
12-27 00:37:24.895: E/AndroidRuntime(1267): at java.lang.reflect.Method.invoke(Method.java:521)
12-27 00:37:24.895: E/AndroidRuntime(1267): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
12-27 00:37:24.895: E/AndroidRuntime(1267): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
12-27 00:37:24.895: E/AndroidRuntime(1267): at dalvik.system.NativeStart.main(Native Method)
12-27 00:37:24.895: E/AndroidRuntime(1267): Caused by: java.lang.NullPointerException
12-27 00:37:24.895: E/AndroidRuntime(1267): at android.content.ContextWrapper.getResources(ContextWrapper.java:80)
12-27 00:37:24.895: E/AndroidRuntime(1267): at com.alpha.liveshit.Sample.<init>(Sample.java:42)
12-27 00:37:24.895: E/AndroidRuntime(1267): at java.lang.Class.newInstanceImpl(Native Method)
12-27 00:37:24.895: E/AndroidRuntime(1267): at java.lang.Class.newInstance(Class.java:1429)
12-27 00:37:24.895: E/AndroidRuntime(1267): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
12-27 00:37:24.895: E/AndroidRuntime(1267): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
12-27 00:37:24.895: E/AndroidRuntime(1267): ... 11 more
You appear to be calling getResources() from your activity's constructor. Your activity should not have a constructor (or, at least, not one that interacts with the framework in any way). It hasn't been properly initialized at that point (which is why the call to getResources() is throwing a NPE). Put all your initialization code in onCreate(Bundle).

Unable to launch app for broadcast intent

I wrote a small clock widget. Like all clocks, it has to be updated every minute. So I set up an alarm to do this. It worked fine. It was just a little too small. So I fiddled with an XML attribute and tried again. It force-closed. I changed the attribute back to the original and tried again. It again force-closed.
The LogCat follows(from package install to the OS killing it):
01-19 13:38:52.292: DEBUG/PackageManager(57): New package installed in /data/app/com.---.clock-2.apk
01-19 13:38:52.571: INFO/ActivityManager(57): Force stopping package com.---.clock uid=10043
01-19 13:38:52.571: INFO/Process(57): Sending signal. PID: 593 SIG: 9
01-19 13:38:52.612: INFO/ActivityManager(57): Force stopping package com.---.clock uid=10043
01-19 13:38:53.022: DEBUG/PhotoAppWidgetProvider(282): getPhoto query count=0
01-19 13:38:53.022: DEBUG/PhotoAppWidgetProvider(282): sending out views=null for id=0
01-19 13:38:53.131: INFO/ActivityManager(57): Start proc com.---.clock for broadcast com.---.clock/.Clock: pid=613 uid=10043 gids={1015}
01-19 13:38:53.713: DEBUG/Clock widget(613): updated
01-19 13:38:54.011: INFO/ActivityManager(57): Force stopping package com.---.clock uid=10043
01-19 13:38:54.021: INFO/Process(57): Sending signal. PID: 613 SIG: 9
01-19 13:38:54.301: DEBUG/dalvikvm(121): GC_EXPLICIT freed 13673 objects / 524360 bytes in 177ms
01-19 13:38:54.542: DEBUG/dalvikvm(125): GC_EXPLICIT freed 4956 objects / 200960 bytes in 440ms
01-19 13:38:54.801: WARN/RecognitionManagerService(57): no available voice recognition services found
01-19 13:38:55.032: DEBUG/dalvikvm(57): GC_EXPLICIT freed 4960 objects / 290104 bytes in 201ms
01-19 13:38:55.042: INFO/installd(35): unlink /data/dalvik-cache/data#app#com.---.clock-1.apk#classes.dex
01-19 13:38:55.131: DEBUG/AndroidRuntime(605): Shutting down VM
01-19 13:38:55.151: DEBUG/dalvikvm(605): Debugger has detached; object registry had 1 entries
01-19 13:38:55.212: INFO/AndroidRuntime(605): NOTE: attach of thread 'Binder Thread #3' failed
01-19 13:38:55.571: DEBUG/PhotoAppWidgetProvider(282): getPhoto query count=0
01-19 13:38:55.571: DEBUG/PhotoAppWidgetProvider(282): sending out views=null for id=0
01-19 13:38:55.762: INFO/ActivityManager(57): Start proc com.---.clock for broadcast com.---.clock/.Clock: pid=622 uid=10043 gids={1015}
01-19 13:38:56.332: WARN/asset(622): Asset path /data/app/com.---.clock-1.apk is neither a directory nor file (type=1).
01-19 13:38:56.373: DEBUG/AndroidRuntime(622): Shutting down VM
01-19 13:38:56.373: WARN/dalvikvm(622): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
01-19 13:38:56.722: DEBUG/PhotoAppWidgetProvider(282): getPhoto query count=0
01-19 13:38:56.732: DEBUG/PhotoAppWidgetProvider(282): sending out views=null for id=0
01-19 13:38:56.841: ERROR/AndroidRuntime(622): FATAL EXCEPTION: main
01-19 13:38:56.841: ERROR/AndroidRuntime(622): java.lang.RuntimeException: Unable to instantiate receiver com.---.clock.Clock: java.lang.ClassNotFoundException: com.---.clock.Clock in loader dalvik.system.PathClassLoader[/data/app/com.---.clock-1.apk]
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2789)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at android.app.ActivityThread.access$3200(ActivityThread.java:125)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2083)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at android.os.Handler.dispatchMessage(Handler.java:99)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at android.os.Looper.loop(Looper.java:123)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at android.app.ActivityThread.main(ActivityThread.java:4627)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at java.lang.reflect.Method.invokeNative(Native Method)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at java.lang.reflect.Method.invoke(Method.java:521)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at dalvik.system.NativeStart.main(Native Method)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): Caused by: java.lang.ClassNotFoundException: com.---.clock.Clock in loader dalvik.system.PathClassLoader[/data/app/com.---.clock-1.apk]
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2780)
01-19 13:38:56.841: ERROR/AndroidRuntime(622): ... 10 more
01-19 13:38:56.901: WARN/asset(57): Asset path /data/app/com.---.clock-1.apk is neither a directory nor file (type=1).
01-19 13:38:56.913: WARN/PackageManager(57): Failure retrieving resources forcom.---.clock
01-19 13:38:57.932: DEBUG/PhotoAppWidgetProvider(282): getPhoto query count=0
01-19 13:38:58.003: DEBUG/PhotoAppWidgetProvider(282): sending out views=null for id=0
01-19 13:39:05.101: INFO/Process(622): Sending signal. PID: 622 SIG: 9
01-19 13:39:05.151: INFO/ActivityManager(57): Process com.---.clock (pid 622) has died.
01-19 13:39:05.182: WARN/InputManagerService(57): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#43ecc698
01-19 13:39:05.892: DEBUG/PhotoAppWidgetProvider(282): getPhoto query count=0
01-19 13:39:05.892: DEBUG/PhotoAppWidgetProvider(282): sending out views=null for id=0
01-19 13:39:06.011: INFO/ActivityManager(57): Start proc com.---.clock for broadcast com.---.clock/.Clock: pid=630 uid=10043 gids={1015}
01-19 13:39:06.413: WARN/asset(630): Asset path /data/app/com.---.clock-1.apk is neither a directory nor file (type=1).
01-19 13:39:06.472: DEBUG/AndroidRuntime(630): Shutting down VM
01-19 13:39:06.482: WARN/dalvikvm(630): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): FATAL EXCEPTION: main
01-19 13:39:06.901: ERROR/AndroidRuntime(630): java.lang.RuntimeException: Unable to instantiate receiver com.---.clock.Clock: java.lang.ClassNotFoundException: com.---.clock.Clock in loader dalvik.system.PathClassLoader[/data/app/com.---.clock-1.apk]
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2789)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at android.app.ActivityThread.access$3200(ActivityThread.java:125)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2083)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at android.os.Handler.dispatchMessage(Handler.java:99)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at android.os.Looper.loop(Looper.java:123)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at android.app.ActivityThread.main(ActivityThread.java:4627)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at java.lang.reflect.Method.invokeNative(Native Method)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at java.lang.reflect.Method.invoke(Method.java:521)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at dalvik.system.NativeStart.main(Native Method)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): Caused by: java.lang.ClassNotFoundException: com.---.clock.Clock in loader dalvik.system.PathClassLoader[/data/app/com.---.clock-1.apk]
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2780)
01-19 13:39:06.901: ERROR/AndroidRuntime(630): ... 10 more
01-19 13:39:06.901: DEBUG/PhotoAppWidgetProvider(282): getPhoto query count=0
01-19 13:39:06.922: DEBUG/PhotoAppWidgetProvider(282): sending out views=null for id=0
01-19 13:39:07.051: WARN/ActivityManager(57): Process com.---.clock has crashed too many times: killing!
01-19 13:39:07.062: INFO/Process(57): Sending signal. PID: 630 SIG: 9
01-19 13:39:07.151: WARN/ActivityManager(57): Unable to launch app com.---.clock/10043 for broadcast Intent { act=android.appwidget.action.APPWIDGET_UPDATE cmp=com.---.clock/.Clock (has extras) }: process is bad
01-19 13:39:07.151: WARN/ActivityManager(57): finishReceiver called but none active
I have never seen this error before and have no idea what's causing it or how to fix it. Can someone interpret this for me please?
For whatever reason, (MAGIC!) Rebooting the emulator worked. I still have no idea why it messed up in the first place, but the reboot worked.

Categories

Resources