Jackson/JSON: ExceptionInInitializerError upon calling new ObjectMapper() - android

I'm using Jackson in my Android app. I have a BroadcastReceiver for incoming calls that saves information about the entire call, then I save it to a JSON object in a JSON array.
Then, I get the exception below which points to the line where I call ObjectMapper mapper = new ObjectMapper(). I don't know what to do since I did not write those classes. Help?
09-04 09:08:58.220: E/AndroidRuntime(4445): FATAL EXCEPTION: main
09-04 09:08:58.220: E/AndroidRuntime(4445): java.lang.ExceptionInInitializerError
09-04 09:08:58.220: E/AndroidRuntime(4445): at com.ourcompany.appname.IncomingCallDetector.saveLog(IncomingCallDetector.java:80)
09-04 09:08:58.220: E/AndroidRuntime(4445): at com.ourcompany.appname.IncomingCallDetector.onReceive(IncomingCallDetector.java:70)
09-04 09:08:58.220: E/AndroidRuntime(4445): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2816)
09-04 09:08:58.220: E/AndroidRuntime(4445): at android.app.ActivityThread.access$3200(ActivityThread.java:126)
09-04 09:08:58.220: E/AndroidRuntime(4445): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2088)
09-04 09:08:58.220: E/AndroidRuntime(4445): at android.os.Handler.dispatchMessage(Handler.java:99)
09-04 09:08:58.220: E/AndroidRuntime(4445): at android.os.Looper.loop(Looper.java:123)
09-04 09:08:58.220: E/AndroidRuntime(4445): at android.app.ActivityThread.main(ActivityThread.java:4633)
09-04 09:08:58.220: E/AndroidRuntime(4445): at java.lang.reflect.Method.invokeNative(Native Method)
09-04 09:08:58.220: E/AndroidRuntime(4445): at java.lang.reflect.Method.invoke(Method.java:521)
09-04 09:08:58.220: E/AndroidRuntime(4445): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
09-04 09:08:58.220: E/AndroidRuntime(4445): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
09-04 09:08:58.220: E/AndroidRuntime(4445): at dalvik.system.NativeStart.main(Native Method)
09-04 09:08:58.220: E/AndroidRuntime(4445): Caused by: java.lang.ExceptionInInitializerError
09-04 09:08:58.220: E/AndroidRuntime(4445): at com.fasterxml.jackson.databind.ObjectMapper.<clinit>(ObjectMapper.java:197)
09-04 09:08:58.220: E/AndroidRuntime(4445): ... 13 more
09-04 09:08:58.220: E/AndroidRuntime(4445): Caused by: java.lang.NoClassDefFoundError: com.fasterxml.jackson.annotation.JsonAutoDetect
09-04 09:08:58.220: E/AndroidRuntime(4445): at com.fasterxml.jackson.databind.introspect.VisibilityChecker$Std.<clinit>(VisibilityChecker.java:169)
09-04 09:08:58.220: E/AndroidRuntime(4445): ... 14 more
My broadcast receiver is here: http://pastie.org/4661134

What seems to happen is that JsonAutoDetect is not added to your project. Make sure it is included in the apk (see classpath part in eclipse if you are using eclipse)

Related

Google Map API v2 is not working on genymotion

My Android code using Google Map API v2 is not working on genymotion. I have developed this code and run on my PC and it works fine, but the same code I am trying in my laptop then it gives me error "app has unfortunately stopped". I checked my code 100 times and it's perfect, everything is perfect in configuration at Google API console.
I have installed Google Play service in genymotion using following links:
http://filetrip.net/dl?4SUOrdcMRv
http://wiki.cyanogenmod.org/w/Google_Apps#gappsCM11
Logcat output:
09-04 20:07:15.691: E/AndroidRuntime(2728): FATAL EXCEPTION: main
09-04 20:07:15.691: E/AndroidRuntime(2728): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.geolocation/com.example.geolocation.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.geolocation.MainActivity" on path: /data/app/com.example.geolocation-2.apk
09-04 20:07:15.691: E/AndroidRuntime(2728): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
09-04 20:07:15.691: E/AndroidRuntime(2728): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
09-04 20:07:15.691: E/AndroidRuntime(2728): at android.app.ActivityThread.access$600(ActivityThread.java:141)
09-04 20:07:15.691: E/AndroidRuntime(2728): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
09-04 20:07:15.691: E/AndroidRuntime(2728): at android.os.Handler.dispatchMessage(Handler.java:99)
09-04 20:07:15.691: E/AndroidRuntime(2728): at android.os.Looper.loop(Looper.java:137)
09-04 20:07:15.691: E/AndroidRuntime(2728): at android.app.ActivityThread.main(ActivityThread.java:5041)
09-04 20:07:15.691: E/AndroidRuntime(2728): at java.lang.reflect.Method.invokeNative(Native Method)
09-04 20:07:15.691: E/AndroidRuntime(2728): at java.lang.reflect.Method.invoke(Method.java:511)
09-04 20:07:15.691: E/AndroidRuntime(2728): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
09-04 20:07:15.691: E/AndroidRuntime(2728): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
09-04 20:07:15.691: E/AndroidRuntime(2728): at dalvik.system.NativeStart.main(Native Method)
09-04 20:07:15.691: E/AndroidRuntime(2728): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.geolocation.MainActivity" on path: /data/app/com.example.geolocation-2.apk
09-04 20:07:15.691: E/AndroidRuntime(2728): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
09-04 20:07:15.691: E/AndroidRuntime(2728): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
09-04 20:07:15.691: E/AndroidRuntime(2728): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
09-04 20:07:15.691: E/AndroidRuntime(2728): at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
09-04 20:07:15.691: E/AndroidRuntime(2728): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
09-04 20:07:15.691: E/AndroidRuntime(2728): ... 11 more

Unfortunately google maps has stopped

I would get google map on my emulator.
I followed the instructions on
When I run the application an error's message appears:Unfortunately DemoGoogleMapsV2 has stopped.
my androidmanifest.xml:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<permission android:name="com.demogooglemapsv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.demogooglemapsv2.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- The following two permissions are not required to use
Google Maps Android API, but are recommended. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="API_KEY"/>
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
my activity_main.xml:
<android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment"/>
my MainActivity.java:
package com.demogooglemapsv2;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
the log error:
09-04 17:43:51.170: E/Trace(1477): error opening trace file: No such
file or directory (2) 09-04 17:43:53.449: E/AndroidRuntime(1477):
FATAL EXCEPTION: main 09-04 17:43:53.449: E/AndroidRuntime(1477):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.demogooglemapsv2/com.demogooglemapsv2.MainActivity}:
android.view.InflateException: Binary XML file line #11: Error
inflating class fragment 09-04 17:43:53.449: E/AndroidRuntime(1477):
at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
09-04 17:43:53.449: E/AndroidRuntime(1477): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
09-04 17:43:53.449: E/AndroidRuntime(1477): at
android.app.ActivityThread.access$600(ActivityThread.java:141) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
09-04 17:43:53.449: E/AndroidRuntime(1477): at
android.os.Handler.dispatchMessage(Handler.java:99) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
android.os.Looper.loop(Looper.java:137) 09-04 17:43:53.449:
E/AndroidRuntime(1477): at
android.app.ActivityThread.main(ActivityThread.java:5041) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
java.lang.reflect.Method.invokeNative(Native Method) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
java.lang.reflect.Method.invoke(Method.java:511) 09-04 17:43:53.449:
E/AndroidRuntime(1477): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
09-04 17:43:53.449: E/AndroidRuntime(1477): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
dalvik.system.NativeStart.main(Native Method) 09-04 17:43:53.449:
E/AndroidRuntime(1477): Caused by: android.view.InflateException:
Binary XML file line #11: Error inflating class fragment 09-04
17:43:53.449: E/AndroidRuntime(1477): at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
09-04 17:43:53.449: E/AndroidRuntime(1477): at
android.view.LayoutInflater.rInflate(LayoutInflater.java:746) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
android.view.LayoutInflater.inflate(LayoutInflater.java:489) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
android.view.LayoutInflater.inflate(LayoutInflater.java:396) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
android.view.LayoutInflater.inflate(LayoutInflater.java:352) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
09-04 17:43:53.449: E/AndroidRuntime(1477): at
android.app.Activity.setContentView(Activity.java:1881) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
com.demogooglemapsv2.MainActivity.onCreate(MainActivity.java:17) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
android.app.Activity.performCreate(Activity.java:5104) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
09-04 17:43:53.449: E/AndroidRuntime(1477): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
09-04 17:43:53.449: E/AndroidRuntime(1477): ... 11 more 09-04
17:43:53.449: E/AndroidRuntime(1477): Caused by:
java.lang.IllegalStateException: The meta-data tag in your app's
AndroidManifest.xml does not have the right value. Expected 5089000
but found 0. You must have the following declaration within the
element: 09-04
17:43:53.449: E/AndroidRuntime(1477): at
com.google.android.gms.common.GooglePlayServicesUtil.A(Unknown Source)
09-04 17:43:53.449: E/AndroidRuntime(1477): at
com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown
Source) 09-04 17:43:53.449: E/AndroidRuntime(1477): at
com.google.android.gms.maps.internal.u.I(Unknown Source) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
com.google.android.gms.maps.internal.u.H(Unknown Source) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
09-04 17:43:53.449: E/AndroidRuntime(1477): at
com.google.android.gms.maps.SupportMapFragment$b.jz(Unknown Source)
09-04 17:43:53.449: E/AndroidRuntime(1477): at
com.google.android.gms.maps.SupportMapFragment$b.a(Unknown Source)
09-04 17:43:53.449: E/AndroidRuntime(1477): at
com.google.android.gms.dynamic.a.a(Unknown Source) 09-04 17:43:53.449:
E/AndroidRuntime(1477): at
com.google.android.gms.dynamic.a.onInflate(Unknown Source) 09-04
17:43:53.449: E/AndroidRuntime(1477): at
com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown
Source) 09-04 17:43:53.449: E/AndroidRuntime(1477): at
android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:291)
09-04 17:43:53.449: E/AndroidRuntime(1477): at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676)
09-04 17:43:53.449: E/AndroidRuntime(1477): ... 21 more
Replace FragmentActivity in place of Activity, make sure you are entering right api key.
And in place of
com.google.android.gms.maps.MapFragment
use
com.google.android.gms.maps.SupportMapFragment
Make sure google play services is installed on your device. That's why try to run the application on real device not on the emulator.
Add the following activity_main.xml:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:id="#+id/LinearLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<fragment
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment"
/>
</LinearLayout>
add this tag in your menifest file
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
Hope your project and google-play-services_lib both are in same workspace and you have added it as library project in your application. If your API-Key is ok then you need to change like this.
1. add this meta-data inside application tag in manifest
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
2. As minSdkVersion="8" you should use SupportMapFragment so activity_main.xml looks like this
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<fragment
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment" />
</RelativeLayout>
3. Instead of Activity you should extend FragmentActivity and use SupportFragmentManager()
public class MainActivity extends FragmentActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
SupportMapFragment fm = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
GoogleMap mMap = fm.getMap();
}
}
Try to run it on real device or Genymotion's emulator after installing
google-play-service. Otherwise you will face a crash

android manifest being choosey

Ok, so I've got my Android application and it wont boot with a "unable to instantiate activity ComponentInfo{}" error, basically theres something wrong in my manifest file that won't let the application launch the first activity. I made a new but essentially duplicated project (manually copying across the Java+XML code for Main, second + third 'tester' activities, and of course Strings). I left the manifest of the new project as it is but added the activity lines for the tester. I wanted everything as stock basically so nothing could go wrong, and nothing did, the application loaded on emulator and my phone alright.
So I copy the new manifest to my old project in an effort to 'default' it, and I copy and pasted the tester activity code that was already there and worked, for the other 3 activity's. Suddenly it doesn't want to work. Everything is there, but what's the problem? (note the icon drawable is changed but that's nothing to do with it). All the activity names match up to package names and whatnot. Could this be a bug? I honestly cannot find anything wrong.
Duplicate (+ working) code
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/logo3"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.ollygrov.bakerspride.Main"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.ollygrov.bakerspride.Cal"
android:label="#string/title_activity_cal" >
</activity>
<activity
android:name="com.ollygrov.bakerspride.Breads"
android:label="#string/title_activity_breads" >
</activity>
</application>
Old (+ not working) code
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.ollygrov.bakerspride.Main"
android:label="#string/app_title" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.ollygrov.bakerspride.Cal"
android:label="#string/title_activity_cal" >
</activity>
<activity
android:name="com.ollygrov.bakerspride.Breads"
android:label="#string/title_activity_breads" >
</activity>
<activity
android:name="com.ollygrov.bakerspride.Gal"
android:label="#string/title_activity_gal" >
</activity>
<activity
android:name="com.ollygrov.bakerspride.Tut"
android:label="#string/title_activity_tut" >
</activity>
<activity
android:name="com.ollygrov.bakerspride.Rec"
android:label="#string/title_activity_rec" >
</activity>
</application>
EDIT: I just copied and pasted the codes into the search bar on Chrome (changing the droid:icon and droid:label to fit) and they are exactly the same!! What?! Am I not allowed to have 6 activities or something?
Errors:
09-04 11:33:04.895: E/AndroidRuntime(717): FATAL EXCEPTION: main
09-04 11:33:04.895: E/AndroidRuntime(717): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.ollygrov.bakerspride/com.ollygrov.bakerspride.Main}: java.lang.NullPointerException
09-04 11:33:04.895: E/AndroidRuntime(717): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1983)
09-04 11:33:04.895: E/AndroidRuntime(717): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
09-04 11:33:04.895: E/AndroidRuntime(717): at android.app.ActivityThread.access$600(ActivityThread.java:130)
09-04 11:33:04.895: E/AndroidRuntime(717): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
09-04 11:33:04.895: E/AndroidRuntime(717): at android.os.Handler.dispatchMessage(Handler.java:99)
09-04 11:33:04.895: E/AndroidRuntime(717): at android.os.Looper.loop(Looper.java:137)
09-04 11:33:04.895: E/AndroidRuntime(717): at android.app.ActivityThread.main(ActivityThread.java:4745)
09-04 11:33:04.895: E/AndroidRuntime(717): at java.lang.reflect.Method.invokeNative(Native Method)
09-04 11:33:04.895: E/AndroidRuntime(717): at java.lang.reflect.Method.invoke(Method.java:511)
09-04 11:33:04.895: E/AndroidRuntime(717): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
09-04 11:33:04.895: E/AndroidRuntime(717): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-04 11:33:04.895: E/AndroidRuntime(717): at dalvik.system.NativeStart.main(Native Method)
09-04 11:33:04.895: E/AndroidRuntime(717): Caused by: java.lang.NullPointerException
09-04 11:33:04.895: E/AndroidRuntime(717): at android.app.Activity.findViewById(Activity.java:1825)
09-04 11:33:04.895: E/AndroidRuntime(717): at com.ollygrov.bakerspride.Main.<init>(Main.java:19)
09-04 11:33:04.895: E/AndroidRuntime(717): at java.lang.Class.newInstanceImpl(Native Method)
09-04 11:33:04.895: E/AndroidRuntime(717): at java.lang.Class.newInstance(Class.java:1319)
09-04 11:33:04.895: E/AndroidRuntime(717): at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
09-04 11:33:04.895: E/AndroidRuntime(717): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
09-04 11:33:04.895: E/AndroidRuntime(717): ... 11 more
09-04 11:34:58.665: E/Trace(765): error opening trace file: No such file or directory (2)
09-04 11:34:59.095: D/AndroidRuntime(765): Shutting down VM
09-04 11:34:59.095: W/dalvikvm(765): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
09-04 11:34:59.114: E/AndroidRuntime(765): FATAL EXCEPTION: main
09-04 11:34:59.114: E/AndroidRuntime(765): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.ollygrov.bakerspride/com.ollygrov.bakerspride.Main}: java.lang.NullPointerException
09-04 11:34:59.114: E/AndroidRuntime(765): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1983)
09-04 11:34:59.114: E/AndroidRuntime(765): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
09-04 11:34:59.114: E/AndroidRuntime(765): at android.app.ActivityThread.access$600(ActivityThread.java:130)
09-04 11:34:59.114: E/AndroidRuntime(765): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
09-04 11:34:59.114: E/AndroidRuntime(765): at android.os.Handler.dispatchMessage(Handler.java:99)
09-04 11:34:59.114: E/AndroidRuntime(765): at android.os.Looper.loop(Looper.java:137)
09-04 11:34:59.114: E/AndroidRuntime(765): at android.app.ActivityThread.main(ActivityThread.java:4745)
09-04 11:34:59.114: E/AndroidRuntime(765): at java.lang.reflect.Method.invokeNative(Native Method)
09-04 11:34:59.114: E/AndroidRuntime(765): at java.lang.reflect.Method.invoke(Method.java:511)
09-04 11:34:59.114: E/AndroidRuntime(765): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
09-04 11:34:59.114: E/AndroidRuntime(765): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-04 11:34:59.114: E/AndroidRuntime(765): at dalvik.system.NativeStart.main(Native Method)
09-04 11:34:59.114: E/AndroidRuntime(765): Caused by: java.lang.NullPointerException
09-04 11:34:59.114: E/AndroidRuntime(765): at android.app.Activity.findViewById(Activity.java:1825)
09-04 11:34:59.114: E/AndroidRuntime(765): at com.ollygrov.bakerspride.Main.<init>(Main.java:19)
09-04 11:34:59.114: E/AndroidRuntime(765): at java.lang.Class.newInstanceImpl(Native Method)
09-04 11:34:59.114: E/AndroidRuntime(765): at java.lang.Class.newInstance(Class.java:1319)
09-04 11:34:59.114: E/AndroidRuntime(765): at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
09-04 11:34:59.114: E/AndroidRuntime(765): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
The problem is your Main Constructor:
09-04 11:33:04.895: E/AndroidRuntime(717): Caused by: java.lang.NullPointerException
09-04 11:33:04.895: E/AndroidRuntime(717): at android.app.Activity.findViewById(Activity.java:1825)
09-04 11:33:04.895: E/AndroidRuntime(717): at com.ollygrov.bakerspride.Main.<init>(Main.java:19)
In line 19 of Main.java you are trying to call findViewById() which will obviously not work. It is way to early to call such code in the constructor.
My best guess is, that you need to move EVERYTHING from the cronstructor to onCreate() of the Activity.
Normally you don't need a custom constructor in Activities or Fragments.

Android - Broadcast Receiver connection gets called

Does anyone know why when I click on a button with onclick() method then a broadcast receiver connextion gets called. This broadcast it's used when the connection switch between off to on or reverse. But I was online already and it got called!
There are the errors:
09-04 22:35:25.285: E/SqliteDatabaseCpp(8057): CREATE TABLE android_metadata failed
09-04 22:35:25.285: E/SQLiteDatabase(8057): Failed to open the database. closing it.
09-04 22:35:25.285: E/SQLiteDatabase(8057): android.database.sqlite.SQLiteDatabaseLockedException: database is locked
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.database.sqlite.SQLiteDatabase.setLocale_(SQLiteDatabase.java:2211)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:2199)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1130)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1081)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1167)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:833)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:221)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:157)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at com.background.Database.open(Database.java:135)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at com.background.Broadcast_Reciver.onReceive(BroadcastService.java:100)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.os.Handler.handleCallback(Handler.java:605)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.os.Handler.dispatchMessage(Handler.java:92)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.os.Looper.loop(Looper.java:137)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at android.app.ActivityThread.main(ActivityThread.java:4507)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at java.lang.reflect.Method.invokeNative(Native Method)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at java.lang.reflect.Method.invoke(Method.java:511)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
09-04 22:35:25.285: E/SQLiteDatabase(8057): at dalvik.system.NativeStart.main(Native Method)
09-04 22:35:25.285: D/AndroidRuntime(8057): Shutting down VM
09-04 22:35:25.285: W/dalvikvm(8057): threadid=1: thread exiting with uncaught exception (group=0x40c341f8)
09-04 22:35:25.300: E/AndroidRuntime(8057): FATAL EXCEPTION: main
09-04 22:35:25.300: E/AndroidRuntime(8057): java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x10000010 (has extras) } in com.background.Broadcast_Reciver#41724178
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:737)
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.os.Handler.handleCallback(Handler.java:605)
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.os.Handler.dispatchMessage(Handler.java:92)
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.os.Looper.loop(Looper.java:137)
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.app.ActivityThread.main(ActivityThread.java:4507)
09-04 22:35:25.300: E/AndroidRuntime(8057): at java.lang.reflect.Method.invokeNative(Native Method)
09-04 22:35:25.300: E/AndroidRuntime(8057): at java.lang.reflect.Method.invoke(Method.java:511)
09-04 22:35:25.300: E/AndroidRuntime(8057): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
09-04 22:35:25.300: E/AndroidRuntime(8057): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
09-04 22:35:25.300: E/AndroidRuntime(8057): at dalvik.system.NativeStart.main(Native Method)
09-04 22:35:25.300: E/AndroidRuntime(8057): Caused by: android.database.sqlite.SQLiteDatabaseLockedException: database is locked
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.database.sqlite.SQLiteDatabase.native_setLocale(Native Method)
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.database.sqlite.SQLiteDatabase.setLocale_(SQLiteDatabase.java:2211)
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.database.sqlite.SQLiteDatabase.setLocale(SQLiteDatabase.java:2199)
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1130)
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1081)
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1167)
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.app.ContextImpl.openOrCreateDatabase(ContextImpl.java:833)
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:221)
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:157)
09-04 22:35:25.300: E/AndroidRuntime(8057): at com.background.Database.open(Database.java:135)
09-04 22:35:25.300: E/AndroidRuntime(8057): at com.background.Broadcast_Reciver.onReceive(BroadcastService.java:100)
09-04 22:35:25.300: E/AndroidRuntime(8057): at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)
09-04 22:35:25.300: E/AndroidRuntime(8057): ... 9 more
Take a look at this error please:
java.lang.RuntimeException: Error receiving broadcast Intent { act=android.net.conn.CONNECTIVITY_CHANGE flg=0x10000010 (has extras) } in com.background.Broadcast_Reciver#41724178

Finding issue in getting latitude and longitude

Here is the program I used to code it in my android application to find the GPS location of the device.
package com.gps.TestingApps;
import android.app.Activity;
import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.widget.TextView;
public class TestingApps extends Activity implements LocationListener{
private LocationManager locationManager;
private TextView latitude;
private TextView longitude;
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//bind the ui components to code referances
latitude = (TextView) findViewById(R.id.latitude);
longitude = (TextView) findViewById(R.id.longitude);
//get the locationManager
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
startListening();
}
private void startListening() {
//registers our class as the listener
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, (LocationListener) this);
}
private void stopListening() {
locationManager.removeUpdates((LocationListener) this);
}
public void onLocationChanged(Location location) {
latitude.setText(location.getLatitude()+"");
longitude.setText(location.getLongitude()+"");
stopListening();
}
public void onProviderDisabled(String provider) {
// TODO Auto-generated method stub
}
public void onProviderEnabled(String provider) {
// TODO Auto-generated method stub
}
public void onStatusChanged(String provider, int status, Bundle extras) {
// TODO Auto-generated method stub
}
}
I didn't get any bugs but there is a runtime error, I can't get the values of latitude and longitude instead I get the value false values for both.
here is the error message displayed in my Logcat.
09-04 12:52:47.541: WARN/ResourceType(59): Failure getting entry for 0x7f020000 (t=1 e=0) in package 0: 0xffffffb5
09-04 12:52:49.981: WARN/ResourceType(122): Failure getting entry for 0x7f020000 (t=1 e=0) in package 0: 0xffffffb5
09-04 12:52:50.161: WARN/PackageManager(122): Failure retrieving icon 0x7f020000 in package com.greatinnovus.TestingApps
09-04 12:52:50.161: WARN/PackageManager(122): android.content.res.Resources$NotFoundException: Resource ID #0x7f020000
09-04 12:52:50.161: WARN/PackageManager(122): at android.content.res.Resources.getValue(Resources.java:846)
09-04 12:52:50.161: WARN/PackageManager(122): at android.content.res.Resources.getDrawable(Resources.java:534)
09-04 12:52:50.161: WARN/PackageManager(122): at android.app.ApplicationContext$ApplicationPackageManager.getDrawable(ApplicationContext.java:1923)
09-04 12:52:50.161: WARN/PackageManager(122): at android.content.pm.ComponentInfo.loadIcon(ComponentInfo.java:88)
09-04 12:52:50.161: WARN/PackageManager(122): at com.htc.launcher.LauncherModel.updateApplicationInfoTitleAndIcon(LauncherModel.java:488)
09-04 12:52:50.161: WARN/PackageManager(122): at com.htc.launcher.LauncherModel.makeAndCacheApplicationInfo(LauncherModel.java:469)
09-04 12:52:50.161: WARN/PackageManager(122): at com.htc.launcher.LauncherModel.access$300(LauncherModel.java:55)
09-04 12:52:50.161: WARN/PackageManager(122): at com.htc.launcher.LauncherModel$1.run(LauncherModel.java:188)
09-04 12:52:50.181: ERROR/PackageInstallationReceiver(235): Remove /data/local/tmp/com.greatinnovus.TestingApps.apk Fail!
09-04 12:52:50.201: WARN/System.err(235): java.io.IOException: Error running exec(). Commands: [/system/xbin/su, 0, /system/bin/rm, /data/local/tmp/com.greatinnovus.TestingApps.apk] Working Directory: null Environment: null
09-04 12:52:50.281: WARN/System.err(235): at java.lang.ProcessManager.exec(ProcessManager.java:196)
09-04 12:52:50.291: WARN/System.err(235): at java.lang.Runtime.exec(Runtime.java:225)
09-04 12:52:50.291: WARN/System.err(235): at java.lang.Runtime.exec(Runtime.java:313)
09-04 12:52:50.301: WARN/System.err(235): at java.lang.Runtime.exec(Runtime.java:246)
09-04 12:52:50.301: WARN/System.err(235): at com.htc.android.psclient.PackageInstallationReceiver.removeTempPackageFile(PackageInstallationReceiver.java:30)
09-04 12:52:50.311: WARN/System.err(235): at com.htc.android.psclient.PackageInstallationReceiver.onReceive(PackageInstallationReceiver.java:22)
09-04 12:52:50.311: WARN/System.err(235): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2408)
09-04 12:52:50.321: WARN/System.err(235): at android.app.ActivityThread.access$2700(ActivityThread.java:112)
09-04 12:52:50.321: WARN/System.err(235): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1741)
09-04 12:52:50.321: WARN/System.err(235): at android.os.Handler.dispatchMessage(Handler.java:99)
09-04 12:52:50.331: WARN/System.err(235): at android.os.Looper.loop(Looper.java:123)
09-04 12:52:50.331: WARN/System.err(235): at android.app.ActivityThread.main(ActivityThread.java:3948)
09-04 12:52:50.341: WARN/System.err(235): at java.lang.reflect.Method.invokeNative(Native Method)
09-04 12:52:50.351: WARN/System.err(235): at java.lang.reflect.Method.invoke(Method.java:521)
09-04 12:52:50.351: WARN/System.err(235): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
09-04 12:52:50.351: WARN/System.err(235): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
09-04 12:52:50.361: WARN/System.err(235): at dalvik.system.NativeStart.main(Native Method)
09-04 12:52:50.361: WARN/System.err(235): Caused by: java.io.IOException: No such file or directory
09-04 12:52:50.381: WARN/System.err(235): at java.lang.ProcessManager.exec(Native Method)
09-04 12:52:50.391: WARN/System.err(235): at java.lang.ProcessManager.exec(ProcessManager.java:194)
09-04 12:52:50.391: WARN/System.err(235): ... 16 more
09-04 12:52:51.751: WARN/Resources(1707): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f050000}
09-04 12:52:51.751: WARN/Resources(1707): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f050002}
09-04 12:53:19.541: ERROR/SETTING_AUTO_BACKLIGHT(59): open: /sys/class/leds/lcd-backlight/auto failed, errno: 2
09-04 12:54:27.811: ERROR/SETTING_AUTO_BACKLIGHT(59): open: /sys/class/leds/lcd-backlight/auto failed, errno: 2
09-04 12:54:43.911: WARN/KeyCharacterMap(1707): Bad keycharmap - filesize=32
09-04 12:54:45.313: WARN/WeatherUtil(122): schedule DCS task, mixed quest code
09-04 12:54:51.962: WARN/MobileDataStateTracker(59): startUsingNetworkFeature=enableAGPS callid=59calluid= 1000
09-04 12:55:21.951: WARN/MobileDataStateTracker(59): stopUsingNetworkFeature=enableAGPS callid=59calluid= 1000
09-04 12:55:38.811: WARN/dalvikvm(122): disableGcForExternalAlloc: true
09-04 12:55:38.971: ERROR/SETTING_AUTO_BACKLIGHT(59): open: /sys/class/leds/lcd-backlight/auto failed, errno: 2
09-04 12:55:39.661: WARN/dalvikvm(122): disableGcForExternalAlloc: false
09-04 12:55:39.841: WARN/dalvikvm(122): disableGcForExternalAlloc: true
09-04 12:55:40.981: WARN/dalvikvm(122): disableGcForExternalAlloc: false
09-04 12:55:43.481: WARN/WeatherUtil(122): schedule DCS task, mixed quest code
09-04 12:56:26.191: WARN/dalvikvm(122): disableGcForExternalAlloc: true
09-04 12:56:27.301: WARN/dalvikvm(122): disableGcForExternalAlloc: false
09-04 12:56:29.811: WARN/WeatherUtil(122): schedule DCS task, mixed quest code
09-04 12:56:42.331: WARN/ResourceType(59): Failure getting entry for 0x7f020000 (t=1 e=0) in package 0: 0xffffffb5
09-04 12:56:45.691: ERROR/PackageInstallationReceiver(235): Remove /data/local/tmp/com.greatinnovus.TestingApps.apk Fail!
09-04 12:56:45.711: WARN/System.err(235): java.io.IOException: Error running exec(). Commands: [/system/xbin/su, 0, /system/bin/rm, /data/local/tmp/com.greatinnovus.TestingApps.apk] Working Directory: null Environment: null
09-04 12:56:45.711: WARN/System.err(235): at java.lang.ProcessManager.exec(ProcessManager.java:196)
09-04 12:56:45.711: WARN/System.err(235): at java.lang.Runtime.exec(Runtime.java:225)
09-04 12:56:45.711: WARN/System.err(235): at java.lang.Runtime.exec(Runtime.java:313)
09-04 12:56:45.721: WARN/System.err(235): at java.lang.Runtime.exec(Runtime.java:246)
09-04 12:56:45.721: WARN/System.err(235): at com.htc.android.psclient.PackageInstallationReceiver.removeTempPackageFile(PackageInstallationReceiver.java:30)
09-04 12:56:45.721: WARN/System.err(235): at com.htc.android.psclient.PackageInstallationReceiver.onReceive(PackageInstallationReceiver.java:22)
09-04 12:56:45.721: WARN/System.err(235): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2408)
09-04 12:56:45.721: WARN/System.err(235): at android.app.ActivityThread.access$2700(ActivityThread.java:112)
09-04 12:56:45.721: WARN/System.err(235): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1741)
09-04 12:56:45.721: WARN/System.err(235): at android.os.Handler.dispatchMessage(Handler.java:99)
09-04 12:56:45.731: WARN/System.err(235): at android.os.Looper.loop(Looper.java:123)
09-04 12:56:45.731: WARN/System.err(235): at android.app.ActivityThread.main(ActivityThread.java:3948)
09-04 12:56:45.731: WARN/System.err(235): at java.lang.reflect.Method.invokeNative(Native Method)
09-04 12:56:45.731: WARN/System.err(235): at java.lang.reflect.Method.invoke(Method.java:521)
09-04 12:56:45.741: WARN/System.err(235): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
09-04 12:56:45.741: WARN/System.err(235): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
09-04 12:56:45.741: WARN/System.err(235): at dalvik.system.NativeStart.main(Native Method)
09-04 12:56:45.741: WARN/System.err(235): Caused by: java.io.IOException: No such file or directory
09-04 12:56:45.761: WARN/System.err(235): at java.lang.ProcessManager.exec(Native Method)
09-04 12:56:45.761: WARN/System.err(235): at java.lang.ProcessManager.exec(ProcessManager.java:194)
09-04 12:56:45.761: WARN/System.err(235): ... 16 more
09-04 12:56:45.901: WARN/ResourceType(122): Failure getting entry for 0x7f020000 (t=1 e=0) in package 0: 0xffffffb5
09-04 12:56:45.941: WARN/PackageManager(122): Failure retrieving icon 0x7f020000 in package com.greatinnovus.TestingApps
09-04 12:56:45.941: WARN/PackageManager(122): android.content.res.Resources$NotFoundException: Resource ID #0x7f020000
09-04 12:56:45.941: WARN/PackageManager(122): at android.content.res.Resources.getValue(Resources.java:846)
09-04 12:56:45.941: WARN/PackageManager(122): at android.content.res.Resources.getDrawable(Resources.java:534)
09-04 12:56:45.941: WARN/PackageManager(122): at android.app.ApplicationContext$ApplicationPackageManager.getDrawable(ApplicationContext.java:1923)
09-04 12:56:45.941: WARN/PackageManager(122): at android.content.pm.ComponentInfo.loadIcon(ComponentInfo.java:88)
09-04 12:56:45.941: WARN/PackageManager(122): at com.htc.launcher.LauncherModel.updateApplicationInfoTitleAndIcon(LauncherModel.java:488)
09-04 12:56:45.941: WARN/PackageManager(122): at com.htc.launcher.LauncherModel.updateAndCacheApplicationInfo(LauncherModel.java:289)
09-04 12:56:45.941: WARN/PackageManager(122): at com.htc.launcher.LauncherModel.access$500(LauncherModel.java:55)
09-04 12:56:45.941: WARN/PackageManager(122): at com.htc.launcher.LauncherModel$2.run(LauncherModel.java:265)
09-04 12:56:46.551: WARN/Resources(1751): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f050000}
09-04 12:56:46.551: WARN/Resources(1751): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f050002}
09-04 12:56:59.111: WARN/KeyCharacterMap(1751): Bad keycharmap - filesize=32
09-04 12:57:00.524: WARN/WeatherUtil(122): schedule DCS task, mixed quest code
09-04 12:57:59.821: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 12:58:59.911: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 12:59:59.981: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:01:00.121: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:01:03.131: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:01:06.141: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:02:06.281: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:03:06.461: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:03:09.463: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:03:12.481: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:04:12.621: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:05:12.741: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:05:15.744: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:05:18.751: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:06:18.881: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:06:21.873: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:07:21.963: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:07:24.971: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:07:27.981: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:08:28.181: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:08:31.182: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:08:34.201: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:08:37.221: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:08:40.241: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:09:40.383: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:09:43.381: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:09:46.401: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:10:46.531: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:11:46.641: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:11:49.641: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:12:49.771: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:12:52.771: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:12:55.801: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:12:58.822: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:12:59.721: WARN/Smack/Packet(166): notify conn break (IOEx), close connection
09-04 13:13:01.832: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:13:04.842: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
09-04 13:13:07.861: WARN/LocationManagerService(59): acquireWakeLock(): Unable to get WiFi lock
Your problem is not related to GPS in any way. You're simply missing an icon in your res/drawable folder, that you're referencing to from somewhere, as you can see in your log.
android.content.res.Resources$NotFoundException:
Resource ID #0x7f020000 09-0

Categories

Resources