LogCat. How to trace a bug? - android

I am new to Android debugging. i read about logCat and DDMS on the functions both have and on filtering.
But, i dont understand how to debug my code with logCat. i classified my logcat by Error. and i got 30 errors relating to all kind of issues, ranging from sound issues to battery issues to main issues...
04-20 06:31:09.982: ERROR/Zygote(33): setreuid() failed. errno: 2
04-20 06:31:16.872: ERROR/Zygote(33): setreuid() failed. errno: 17
04-20 06:31:18.064: ERROR/BatteryService(60): usbOnlinePath not found
04-20 06:31:18.064: ERROR/BatteryService(60): batteryVoltagePath not found
04-20 06:31:18.064: ERROR/BatteryService(60): batteryTemperaturePath not found
04-20 06:31:18.082: ERROR/SurfaceFlinger(60): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
04-20 06:31:23.482: ERROR/EventHub(60): could not get driver version for /dev/input/mouse0, Not a typewriter
04-20 06:31:23.482: ERROR/EventHub(60): could not get driver version for /dev/input/mice, Not a typewriter
04-20 06:31:23.692: ERROR/System(60): Failure starting core service
04-20 06:31:23.692: ERROR/System(60): java.lang.SecurityException
04-20 06:31:23.692: ERROR/System(60): at android.os.BinderProxy.transact(Native Method)
04-20 06:31:23.692: ERROR/System(60): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
04-20 06:31:23.692: ERROR/System(60): at android.os.ServiceManager.addService(ServiceManager.java:72)
04-20 06:31:23.692: ERROR/System(60): at com.android.server.ServerThread.run(SystemServer.java:184)
04-20 06:31:24.602: ERROR/SoundPool(60): error loading /system/media/audio/ui/Effect_Tick.ogg
04-20 06:31:24.602: ERROR/SoundPool(60): error loading /system/media/audio/ui/KeypressStandard.ogg
04-20 06:31:24.602: ERROR/SoundPool(60): error loading /system/media/audio/ui/KeypressSpacebar.ogg
04-20 06:31:24.612: ERROR/SoundPool(60): error loading /system/media/audio/ui/KeypressDelete.ogg
04-20 06:31:24.622: ERROR/SoundPool(60): error loading /system/media/audio/ui/KeypressReturn.ogg
04-20 06:31:26.411: ERROR/ThrottleService(60): Could not open GPS configuration file /etc/gps.conf
04-20 06:31:27.751: ERROR/logwrapper(149): executing /system/bin/tc failed: No such file or directory
04-20 06:31:27.792: ERROR/logwrapper(150): executing /system/bin/tc failed: No such file or directory
04-20 06:31:27.823: ERROR/logwrapper(151): executing /system/bin/tc failed: No such file or directory
04-20 06:31:37.841: ERROR/HierarchicalStateMachine(60): TetherMaster - unhandledMessage: msg.what=3
04-20 06:31:58.767: ERROR/AndroidRuntime(277): FATAL EXCEPTION: main
04-20 06:31:58.767: ERROR/AndroidRuntime(277): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.markana.yamba/com.markana.yamba.StatusActivity1}: java.lang.ClassNotFoundException: com.markana.yamba.StatusActivity1 in loader dalvik.system.PathClassLoader[/data/app/com.markana.yamba-2.apk]
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at android.os.Handler.dispatchMessage(Handler.java:99)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at android.os.Looper.loop(Looper.java:123)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at android.app.ActivityThread.main(ActivityThread.java:4627)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at java.lang.reflect.Method.invokeNative(Native Method)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at java.lang.reflect.Method.invoke(Method.java:521)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at dalvik.system.NativeStart.main(Native Method)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): Caused by: java.lang.ClassNotFoundException: com.markana.yamba.StatusActivity1 in loader dalvik.system.PathClassLoader[/data/app/com.markana.yamba-2.apk]
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
04-20 06:31:58.767: ERROR/AndroidRuntime(277): ... 11 more
04-20 07:30:54.993: ERROR/Zygote(33): setreuid() failed. errno: 2
04-20 07:31:02.125: ERROR/Zygote(33): setreuid() failed. errno: 17
04-20 07:31:03.243: ERROR/BatteryService(59): usbOnlinePath not found
04-20 07:31:03.243: ERROR/BatteryService(59): batteryVoltagePath not found
04-20 07:31:03.243: ERROR/BatteryService(59): batteryTemperaturePath not found
04-20 07:31:03.273: ERROR/SurfaceFlinger(59): Couldn't open /sys/power/wait_for_fb_sleep or /sys/power/wait_for_fb_wake
04-20 07:31:09.004: ERROR/EventHub(59): could not get driver version for /dev/input/mouse0, Not a typewriter
04-20 07:31:09.004: ERROR/EventHub(59): could not get driver version for /dev/input/mice, Not a typewriter
04-20 07:31:09.265: ERROR/System(59): Failure starting core service
04-20 07:31:09.265: ERROR/System(59): java.lang.SecurityException
04-20 07:31:09.265: ERROR/System(59): at android.os.BinderProxy.transact(Native Method)
04-20 07:31:09.265: ERROR/System(59): at android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
04-20 07:31:09.265: ERROR/System(59): at android.os.ServiceManager.addService(ServiceManager.java:72)
04-20 07:31:09.265: ERROR/System(59): at com.android.server.ServerThread.run(SystemServer.java:184)
04-20 07:31:10.843: ERROR/SoundPool(59): error loading /system/media/audio/ui/Effect_Tick.ogg
04-20 07:31:10.865: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressStandard.ogg
04-20 07:31:10.865: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressSpacebar.ogg
04-20 07:31:10.873: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressDelete.ogg
04-20 07:31:10.884: ERROR/SoundPool(59): error loading /system/media/audio/ui/KeypressReturn.ogg
04-20 07:31:12.824: ERROR/ThrottleService(59): Could not open GPS configuration file /etc/gps.conf
04-20 07:31:14.294: ERROR/logwrapper(149): executing /system/bin/tc failed: No such file or directory
04-20 07:31:14.364: ERROR/logwrapper(150): executing /system/bin/tc failed: No such file or directory
04-20 07:31:14.403: ERROR/logwrapper(152): executing /system/bin/tc failed: No such file or directory
04-20 07:31:26.859: ERROR/HierarchicalStateMachine(59): TetherMaster - unhandledMessage: msg.what=3
04-20 07:31:49.188: ERROR/AndroidRuntime(298): FATAL EXCEPTION: main
04-20 07:31:49.188: ERROR/AndroidRuntime(298): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.markana.yamba/com.markana.yamba.StatusActivity1}: java.lang.ClassNotFoundException: com.markana.yamba.StatusActivity1 in loader dalvik.system.PathClassLoader[/data/app/com.markana.yamba-1.apk]
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at android.os.Handler.dispatchMessage(Handler.java:99)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at android.os.Looper.loop(Looper.java:123)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at android.app.ActivityThread.main(ActivityThread.java:4627)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at java.lang.reflect.Method.invokeNative(Native Method)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at java.lang.reflect.Method.invoke(Method.java:521)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at dalvik.system.NativeStart.main(Native Method)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): Caused by: java.lang.ClassNotFoundException: com.markana.yamba.StatusActivity1 in loader dalvik.system.PathClassLoader[/data/app/com.markana.yamba-1.apk]
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
04-20 07:31:49.188: ERROR/AndroidRuntime(298): ... 11 more
04-20 07:33:45.057: ERROR/AndroidRuntime(369): FATAL EXCEPTION: main
04-20 07:33:45.057: ERROR/AndroidRuntime(369): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.markana.yamba/com.markana.yamba.StatusActivity1}: java.lang.ClassNotFoundException: com.markana.yamba.StatusActivity1 in loader dalvik.system.PathClassLoader[/data/app/com.markana.yamba-1.apk]
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at android.os.Handler.dispatchMessage(Handler.java:99)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at android.os.Looper.loop(Looper.java:123)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at android.app.ActivityThread.main(ActivityThread.java:4627)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at java.lang.reflect.Method.invokeNative(Native Method)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at java.lang.reflect.Method.invoke(Method.java:521)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at dalvik.system.NativeStart.main(Native Method)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): Caused by: java.lang.ClassNotFoundException: com.markana.yamba.StatusActivity1 in loader dalvik.system.PathClassLoader[/data/app/com.markana.yamba-1.apk]
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
04-20 07:33:45.057: ERROR/AndroidRuntime(369): ... 11 more
04-20 07:33:58.677: ERROR/AndroidRuntime(412): FATAL EXCEPTION: main
04-20 07:33:58.677: ERROR/AndroidRuntime(412): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.markana.yamba/com.markana.yamba.StatusActivity1}: java.lang.ClassNotFoundException: com.markana.yamba.StatusActivity1 in loader dalvik.system.PathClassLoader[/data/app/com.markana.yamba-2.apk]
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at android.os.Handler.dispatchMessage(Handler.java:99)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at android.os.Looper.loop(Looper.java:123)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at android.app.ActivityThread.main(ActivityThread.java:4627)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at java.lang.reflect.Method.invokeNative(Native Method)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at java.lang.reflect.Method.invoke(Method.java:521)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at dalvik.system.NativeStart.main(Native Method)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): Caused by: java.lang.ClassNotFoundException: com.markana.yamba.StatusActivity1 in loader dalvik.system.PathClassLoader[/data/app/com.markana.yamba-2.apk]
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
04-20 07:33:58.677: ERROR/AndroidRuntime(412): ... 11 more
My code in the class is quite simple, i did what the example in Android Orielly book did:
package com.markana.yamba;
import winterwell.jtwitter.Twitter;
import winterwell.jtwitter.TwitterException;
import android.app.Activity;
import android.graphics.Color;
import android.os.AsyncTask;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
public class StatusActivity2 extends Activity implements OnClickListener{
private static final String TAG= "StatusActivity";
EditText editText;
Button updateButton;
TextView textCount;
Twitter twitter;
/** Called when the activity is first created. */
#SuppressWarnings("deprecation")
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.status);
//Finds views
editText =(EditText) findViewById(R.id.editText);
updateButton=(Button) findViewById(R.id.buttonUpdate);
updateButton.setOnClickListener(this);
textCount= (TextView) findViewById(R.id.editText);
textCount.setText(Integer.toString(40));
textCount.setTextColor(Color.GREEN);
// editText.addTextChangedListener(this);
twitter=new Twitter("student","password");
twitter.setAPIRootUrl(("http://yamba.marakana.com/api"));
//added by me
AsyncTask<String, ?, ?> asyn=new PostToTwitter();
asyn.execute("deliver this to twitter");
}
class PostToTwitter extends AsyncTask<String,Integer, String>
{
#Override
protected String doInBackground(String... statuses) {
try{
Twitter.Status status=twitter.updateStatus(statuses[0]);
return status.text;
}
catch(TwitterException e)
{
Log.e(TAG,e.toString());
e.printStackTrace();
return "Failed to post";
}
}
protected void onProgressUpdate(Integer...values)
{
super.onProgressUpdate(values);
}
protected void onPostExecute(String result)
{
Toast.makeText(StatusActivity2.this,result,Toast.LENGTH_LONG).show();
}
}
public void onClick(View arg0) {
// TODO Auto-generated method stub
String status=editText.getText().toString();
new PostToTwitter().execute(status);
Log.d(TAG, "onClick");
}
}
i have no red error marks, nor here nor in the main.xml , string.xml files
How do i trace my bug?

You just read through the output to find
Caused by: java.lang.ClassNotFoundException: com.markana.yamba.StatusActivity1
Which means that this class is missing in the .apk that you've deployed to the device.
Note that your activity is named StatusActivity2 - double check the manifest if that has still StatusActivity1.

Related

Genymotion is crashing when I search my current location but when I run the same app in my mobile it is sucessfully running

04-20 07:50:39.793: E/AndroidRuntime(1983): FATAL EXCEPTION: main
04-20 07:50:39.793: E/AndroidRuntime(1983): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.googlemap/com.example.googlemap.LocationSearch}: java.lang.NullPointerException
04-20 07:50:39.793: E/AndroidRuntime(1983): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211)
04-20 07:50:39.793: E/AndroidRuntime(1983): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
04-20 07:50:39.793: E/AndroidRuntime(1983): at android.app.ActivityThread.access$600(ActivityThread.java:141)
04-20 07:50:39.793: E/AndroidRuntime(1983): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
04-20 07:50:39.793: E/AndroidRuntime(1983): at android.os.Handler.dispatchMessage(Handler.java:99)
04-20 07:50:39.793: E/AndroidRuntime(1983): at android.os.Looper.loop(Looper.java:137)
04-20 07:50:39.793: E/AndroidRuntime(1983): at android.app.ActivityThread.main(ActivityThread.java:5103)
04-20 07:50:39.793: E/AndroidRuntime(1983): at java.lang.reflect.Method.invokeNative(Native Method)
04-20 07:50:39.793: E/AndroidRuntime(1983): at java.lang.reflect.Method.invoke(Method.java:525)
04-20 07:50:39.793: E/AndroidRuntime(1983): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
04-20 07:50:39.793: E/AndroidRuntime(1983): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
04-20 07:50:39.793: E/AndroidRuntime(1983): at dalvik.system.NativeStart.main(Native Method)
04-20 07:50:39.793: E/AndroidRuntime(1983): Caused by: java.lang.NullPointerException
04-20 07:50:39.793: E/AndroidRuntime(1983): at com.example.googlemap.LocationSearch.onCreate(LocationSearch.java:95)
04-20 07:50:39.793: E/AndroidRuntime(1983): at android.app.Activity.performCreate(Activity.java:5133)
04-20 07:50:39.793: E/AndroidRuntime(1983): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
04-20 07:50:39.793: E/AndroidRuntime(1983): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2175)
04-20 07:50:39.793: E/AndroidRuntime(1983): ... 11 more
and Genymotion is showing error on:
googleMap.setMyLocationEnabled(true);
Even my Genymotion GPS location is ON and set on my current location
and it is running fine on my mobile device.
Your problem is that you are using Google Location Services but you don't have Gapps inside the Genymotion emulator!
Try to follow this tutorial in order to flash'em inside the Genymotion ROM.
Its best practice if you use real device for camera or location based apps.As real devices have different camera features that you can not access on emulator.Same is the case with location based apps that you can not have real locations on emulator and more of that Google keep updating map apis for real devices.

direct event insert to attendees table exceotion if sdk versio lower than 19

I am building an application in which I am inserting events directly to the calendar plus I left the possibility to invite someone else and everything is perfectly fine if I execute it on android sdk version 19 and above, on lower versions I get an exception.
Here is the source:
ContentResolver atend = getContentResolver();
ContentValues val = new ContentValues();
val.put(CalendarContract.Attendees.ATTENDEE_NAME, "Bajo");
val.put(CalendarContract.Attendees.ATTENDEE_EMAIL, someonesEmail);
val.put(CalendarContract.Attendees.ATTENDEE_RELATIONSHIP, CalendarContract.Attendees.RELATIONSHIP_ATTENDEE);
val.put(CalendarContract.Attendees.ATTENDEE_TYPE, CalendarContract.Attendees.TYPE_REQUIRED);
val.put(CalendarContract.Attendees.ATTENDEE_STATUS, CalendarContract.Attendees.ATTENDEE_STATUS_INVITED);
val.put(CalendarContract.Attendees.EVENT_ID, eventID);
Uri muri= atend.insert(CalendarContract.Attendees.CONTENT_URI, val);
Log.d("Atendees URI:",muri.toString());
long Aeventid=Long.parseLong(muri.getLastPathSegment());
the Exception:
03-05 19:45:59.681 1255-1266/? E/DatabaseUtils﹕ Writing exception to parcel
android.database.sqlite.SQLiteDoneException
at android.database.sqlite.SQLiteConnection.nativeExecuteForLong(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLong(SQLiteConnection.java:591)
at android.database.sqlite.SQLiteSession.executeForLong(SQLiteSession.java:652)
at android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:107)
at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:816)
at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:804)
at com.android.providers.calendar.CalendarDatabaseHelper.duplicateEvent(CalendarDatabaseHelper.java:3311)
at com.android.providers.calendar.CalendarProvider2.insertInTransaction(CalendarProvider2.java:2265)
at com.android.providers.calendar.SQLiteContentProvider.insert(SQLiteContentProvider.java:96)
at android.content.ContentProvider$Transport.insert(ContentProvider.java:201)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:148)
at android.os.Binder.execTransact(Binder.java:367)
at dalvik.system.NativeStart.run(Native Method)
03-05 19:45:59.681 1632-1632/? D/AndroidRuntime﹕ Shutting down VM
03-05 19:45:59.681 1632-1632/? W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0xb2f7e288)
03-05 19:45:59.681 1632-1632/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:3591)
at android.view.View.performClick(View.java:4084)
at android.view.View$PerformClick.run(View.java:16966)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
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:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3586)
            at android.view.View.performClick(View.java:4084)
            at android.view.View$PerformClick.run(View.java:16966)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4745)
            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:786)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
            at dalvik.system.NativeStart.main(Native Method)
Caused by: android.database.sqlite.SQLiteException
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:184)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140)
at android.content.ContentProviderProxy.insert(ContentProviderNative.java:420)
at android.content.ContentResolver.insert(ContentResolver.java:864)
at com.example.rusev.vetcalendar.MainActivity.insertToCalendarImmunization(MainActivity.java:809)
at com.example.rusev.vetcalendar.MainActivity.syncToCalendar(MainActivity.java:931)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at android.view.View$1.onClick(View.java:3586)
            at android.view.View.performClick(View.java:4084)
            at android.view.View$PerformClick.run(View.java:16966)
            at android.os.Handler.handleCallback(Handler.java:615)
            at android.os.Handler.dispatchMessage(Handler.java:92)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4745)
            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:786)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
            at dalvik.system.NativeStart.main(Native Method)
Can you help me to identify what I miss?

App has Stopped unexpectedly

I try to run google map from this page https://developers.google.com/maps/documentation/android/start#getting_the_google_maps_android_api_v2
This is my
.java page
package com.findyourtaxihere.taxi;
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);
}
}
This is Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.findyourtaxihere.taxi"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<permission
android:name="com.vogella.android.locationapi.maps.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="com.vogella.android.locationapi.maps.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<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>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.my api"
android:value="my api"/>
</application>
</manifest>
my activity main
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:name="com.google.android.gms.maps.MapFragment"/>
when run my app , it shows error like this stops unfortunately , and i'm new for android please help me !
log
02-02 19:03:54.871: I/Process(284): Sending signal. PID: 284 SIG: 9
02-02 19:04:00.491: D/AndroidRuntime(307): Shutting down VM
02-02 19:04:00.491: W/dalvikvm(307): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
02-02 19:04:00.511: E/AndroidRuntime(307): FATAL EXCEPTION: main
02-02 19:04:00.511: E/AndroidRuntime(307): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.findyourtaxihere.taxi/com.findyourtaxihere.taxi.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.os.Looper.loop(Looper.java:123)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-02 19:04:00.511: E/AndroidRuntime(307): at java.lang.reflect.Method.invokeNative(Native Method)
02-02 19:04:00.511: E/AndroidRuntime(307): at java.lang.reflect.Method.invoke(Method.java:521)
02-02 19:04:00.511: E/AndroidRuntime(307): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-02 19:04:00.511: E/AndroidRuntime(307): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-02 19:04:00.511: E/AndroidRuntime(307): at dalvik.system.NativeStart.main(Native Method)
02-02 19:04:00.511: E/AndroidRuntime(307): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-02 19:04:00.511: E/AndroidRuntime(307): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.Activity.setContentView(Activity.java:1647)
02-02 19:04:00.511: E/AndroidRuntime(307): at com.findyourtaxihere.taxi.MainActivity.onCreate(MainActivity.java:13)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
02-02 19:04:00.511: E/AndroidRuntime(307): ... 11 more
02-02 19:04:00.511: E/AndroidRuntime(307): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/com.findyourtaxihere.taxi-2.apk]
02-02 19:04:00.511: E/AndroidRuntime(307): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
02-02 19:04:00.511: E/AndroidRuntime(307): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
02-02 19:04:00.511: E/AndroidRuntime(307): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:544)
02-02 19:04:00.511: E/AndroidRuntime(307): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
02-02 19:04:00.511: E/AndroidRuntime(307): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
02-02 19:04:00.511: E/AndroidRuntime(307): ... 19 more
02-02 19:09:36.841: I/dalvikvm(334): Could not find method com.findyourtaxihere.taxi.MainActivity.getFragmentManager, referenced from method com.findyourtaxihere.taxi.MainActivity.onCreate
02-02 19:09:36.841: W/dalvikvm(334): VFY: unable to resolve virtual method 12505: Lcom/findyourtaxihere/taxi/MainActivity;.getFragmentManager ()Landroid/app/FragmentManager;
02-02 19:09:36.841: D/dalvikvm(334): VFY: replacing opcode 0x6e at 0x0009
02-02 19:09:36.852: D/dalvikvm(334): VFY: dead code 0x000c-0019 in Lcom/findyourtaxihere/taxi/MainActivity;.onCreate (Landroid/os/Bundle;)V
02-02 19:09:36.922: D/AndroidRuntime(334): Shutting down VM
02-02 19:09:36.922: W/dalvikvm(334): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
02-02 19:09:36.942: E/AndroidRuntime(334): FATAL EXCEPTION: main
02-02 19:09:36.942: E/AndroidRuntime(334): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.findyourtaxihere.taxi/com.findyourtaxihere.taxi.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.os.Looper.loop(Looper.java:123)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-02 19:09:36.942: E/AndroidRuntime(334): at java.lang.reflect.Method.invokeNative(Native Method)
02-02 19:09:36.942: E/AndroidRuntime(334): at java.lang.reflect.Method.invoke(Method.java:521)
02-02 19:09:36.942: E/AndroidRuntime(334): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-02 19:09:36.942: E/AndroidRuntime(334): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-02 19:09:36.942: E/AndroidRuntime(334): at dalvik.system.NativeStart.main(Native Method)
02-02 19:09:36.942: E/AndroidRuntime(334): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-02 19:09:36.942: E/AndroidRuntime(334): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.Activity.setContentView(Activity.java:1647)
02-02 19:09:36.942: E/AndroidRuntime(334): at com.findyourtaxihere.taxi.MainActivity.onCreate(MainActivity.java:18)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
02-02 19:09:36.942: E/AndroidRuntime(334): ... 11 more
02-02 19:09:36.942: E/AndroidRuntime(334): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/com.findyourtaxihere.taxi-1.apk]
02-02 19:09:36.942: E/AndroidRuntime(334): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
02-02 19:09:36.942: E/AndroidRuntime(334): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
02-02 19:09:36.942: E/AndroidRuntime(334): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:544)
02-02 19:09:36.942: E/AndroidRuntime(334): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
02-02 19:09:36.942: E/AndroidRuntime(334): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
02-02 19:09:36.942: E/AndroidRuntime(334): ... 19 more
02-02 19:09:40.241: I/Process(334): Sending signal. PID: 334 SIG: 9
02-02 19:15:23.312: I/dalvikvm(370): Could not find method com.findyourtaxihere.taxi.MainActivity.getFragmentManager, referenced from method com.findyourtaxihere.taxi.MainActivity.onCreate
02-02 19:15:23.312: W/dalvikvm(370): VFY: unable to resolve virtual method 12505: Lcom/findyourtaxihere/taxi/MainActivity;.getFragmentManager ()Landroid/app/FragmentManager;
02-02 19:15:23.312: D/dalvikvm(370): VFY: replacing opcode 0x6e at 0x0009
02-02 19:15:23.322: D/dalvikvm(370): VFY: dead code 0x000c-0019 in Lcom/findyourtaxihere/taxi/MainActivity;.onCreate (Landroid/os/Bundle;)V
02-02 19:15:23.392: D/AndroidRuntime(370): Shutting down VM
02-02 19:15:23.392: W/dalvikvm(370): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
02-02 19:15:23.422: E/AndroidRuntime(370): FATAL EXCEPTION: main
02-02 19:15:23.422: E/AndroidRuntime(370): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.findyourtaxihere.taxi/com.findyourtaxihere.taxi.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.os.Looper.loop(Looper.java:123)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-02 19:15:23.422: E/AndroidRuntime(370): at java.lang.reflect.Method.invokeNative(Native Method)
02-02 19:15:23.422: E/AndroidRuntime(370): at java.lang.reflect.Method.invoke(Method.java:521)
02-02 19:15:23.422: E/AndroidRuntime(370): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-02 19:15:23.422: E/AndroidRuntime(370): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-02 19:15:23.422: E/AndroidRuntime(370): at dalvik.system.NativeStart.main(Native Method)
02-02 19:15:23.422: E/AndroidRuntime(370): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-02 19:15:23.422: E/AndroidRuntime(370): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.Activity.setContentView(Activity.java:1647)
02-02 19:15:23.422: E/AndroidRuntime(370): at com.findyourtaxihere.taxi.MainActivity.onCreate(MainActivity.java:18)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
02-02 19:15:23.422: E/AndroidRuntime(370): ... 11 more
02-02 19:15:23.422: E/AndroidRuntime(370): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/com.findyourtaxihere.taxi-2.apk]
02-02 19:15:23.422: E/AndroidRuntime(370): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
02-02 19:15:23.422: E/AndroidRuntime(370): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
02-02 19:15:23.422: E/AndroidRuntime(370): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:544)
02-02 19:15:23.422: E/AndroidRuntime(370): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
02-02 19:15:23.422: E/AndroidRuntime(370): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
02-02 19:15:23.422: E/AndroidRuntime(370): ... 19 more
02-02 19:15:26.542: I/Process(370): Sending signal. PID: 370 SIG: 9
02-02 19:18:15.771: I/dalvikvm(397): Could not find method com.findyourtaxihere.taxi.MainActivity.getFragmentManager, referenced from method com.findyourtaxihere.taxi.MainActivity.onCreate
02-02 19:18:15.771: W/dalvikvm(397): VFY: unable to resolve virtual method 12506: Lcom/findyourtaxihere/taxi/MainActivity;.getFragmentManager ()Landroid/app/FragmentManager;
02-02 19:18:15.771: D/dalvikvm(397): VFY: replacing opcode 0x6e at 0x0009
02-02 19:18:15.782: D/dalvikvm(397): VFY: dead code 0x000c-005e in Lcom/findyourtaxihere/taxi/MainActivity;.onCreate (Landroid/os/Bundle;)V
02-02 19:18:15.821: D/AndroidRuntime(397): Shutting down VM
02-02 19:18:15.821: W/dalvikvm(397): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
02-02 19:18:15.851: E/AndroidRuntime(397): FATAL EXCEPTION: main
02-02 19:18:15.851: E/AndroidRuntime(397): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.findyourtaxihere.taxi/com.findyourtaxihere.taxi.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.os.Looper.loop(Looper.java:123)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-02 19:18:15.851: E/AndroidRuntime(397): at java.lang.reflect.Method.invokeNative(Native Method)
02-02 19:18:15.851: E/AndroidRuntime(397): at java.lang.reflect.Method.invoke(Method.java:521)
02-02 19:18:15.851: E/AndroidRuntime(397): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-02 19:18:15.851: E/AndroidRuntime(397): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-02 19:18:15.851: E/AndroidRuntime(397): at dalvik.system.NativeStart.main(Native Method)
02-02 19:18:15.851: E/AndroidRuntime(397): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-02 19:18:15.851: E/AndroidRuntime(397): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.Activity.setContentView(Activity.java:1647)
02-02 19:18:15.851: E/AndroidRuntime(397): at com.findyourtaxihere.taxi.MainActivity.onCreate(MainActivity.java:20)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
02-02 19:18:15.851: E/AndroidRuntime(397): ... 11 more
02-02 19:18:15.851: E/AndroidRuntime(397): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/com.findyourtaxihere.taxi-1.apk]
02-02 19:18:15.851: E/AndroidRuntime(397): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
02-02 19:18:15.851: E/AndroidRuntime(397): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
02-02 19:18:15.851: E/AndroidRuntime(397): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:544)
02-02 19:18:15.851: E/AndroidRuntime(397): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
02-02 19:18:15.851: E/AndroidRuntime(397): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
02-02 19:18:15.851: E/AndroidRuntime(397): ... 19 more
02-02 19:22:23.441: D/AndroidRuntime(453): Shutting down VM
02-02 19:22:23.441: W/dalvikvm(453): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
02-02 19:22:23.471: E/AndroidRuntime(453): FATAL EXCEPTION: main
02-02 19:22:23.471: E/AndroidRuntime(453): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.findyourtaxihere.taxi/com.findyourtaxihere.taxi.MainActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.os.Looper.loop(Looper.java:123)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-02 19:22:23.471: E/AndroidRuntime(453): at java.lang.reflect.Method.invokeNative(Native Method)
02-02 19:22:23.471: E/AndroidRuntime(453): at java.lang.reflect.Method.invoke(Method.java:521)
02-02 19:22:23.471: E/AndroidRuntime(453): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-02 19:22:23.471: E/AndroidRuntime(453): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-02 19:22:23.471: E/AndroidRuntime(453): at dalvik.system.NativeStart.main(Native Method)
02-02 19:22:23.471: E/AndroidRuntime(453): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-02 19:22:23.471: E/AndroidRuntime(453): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.Activity.setContentView(Activity.java:1647)
02-02 19:22:23.471: E/AndroidRuntime(453): at com.findyourtaxihere.taxi.MainActivity.onCreate(MainActivity.java:16)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
02-02 19:22:23.471: E/AndroidRuntime(453): ... 11 more
02-02 19:22:23.471: E/AndroidRuntime(453): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/com.findyourtaxihere.taxi-1.apk]
02-02 19:22:23.471: E/AndroidRuntime(453): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
02-02 19:22:23.471: E/AndroidRuntime(453): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
02-02 19:22:23.471: E/AndroidRuntime(453): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.createView(LayoutInflater.java:466)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:544)
02-02 19:22:23.471: E/AndroidRuntime(453): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
02-02 19:22:23.471: E/AndroidRuntime(453): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
02-02 19:22:23.471: E/AndroidRuntime(453): ... 19 more
02-02 19:27:23.551: I/Process(453): Sending signal. PID: 453 SIG: 9
You need to set your min SDK to 11 so the code can only be run on devices where Activity knows how to inflate fragment tags.
Or just use the v4 support library and change your activity to extend FragmentActivity.

Problem in Hello Form Stuff-application not working on emulator

I have been trying the "Form Stuff" example given in the android developer site. however, on the emulator I keep getting the message that the application has stopped working unexpectedly. I completely copied the code from the site, yet this seems to be happening. what am I doing wrong?
HelloFormStuff2.java:
package com.android.HelloLinearLayouts;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;
public class HelloFormStuff2 extends Activity {
/** Called when the activity is first created. */
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final Button button = (Button) findViewById(R.id.button);
button.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// Perform action on clicks
Toast.makeText(HelloFormStuff2.this,
"Beep Bop",
Toast.LENGTH_SHORT).show();
}
});
}
}
the main.xml file:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<Button
android:id="#+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:background="#drawable/android_button" />
</LinearLayout>
android_button.xml:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="#drawable/android_pressed"
android:state_pressed="true" />
<item android:drawable="#drawable/android_focused"
android:state_focused="true" />
<item android:drawable="#drawable/android_normal" />
</selector>
what should i do?
log:
this is what is happening in the end:-
08-10 09:30:15.335: DEBUG/AndroidRuntime(265): Shutting down VM
08-10 09:30:15.335: DEBUG/jdwp(265): adbd disconnected
08-10 09:30:15.405: INFO/AndroidRuntime(265): NOTE: attach of thread 'Binder Thread #3' failed
08-10 09:30:15.865: INFO/ARMAssembler(58): generated scanline__00000077:03545404_00000004_00000000 [ 47 ipp] (67 ins) at [0x3462c8:0x3463d4] in 376387 ns
08-10 09:30:15.955: DEBUG/AndroidRuntime(277): Shutting down VM
08-10 09:30:15.955: WARN/dalvikvm(277): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): FATAL EXCEPTION: main
08-10 09:30:16.024: ERROR/AndroidRuntime(277): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.android.HelloLinearLayouts/com.android.HelloLinearLayouts.HelloFormStuff2Activity}: java.lang.ClassNotFoundException: com.android.HelloLinearLayouts.HelloFormStuff2Activity in loader dalvik.system.PathClassLoader[/data/app/com.android.HelloLinearLayouts-1.apk]
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at android.os.Handler.dispatchMessage(Handler.java:99)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at android.os.Looper.loop(Looper.java:123)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at android.app.ActivityThread.main(ActivityThread.java:4627)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at java.lang.reflect.Method.invokeNative(Native Method)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at java.lang.reflect.Method.invoke(Method.java:521)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at dalvik.system.NativeStart.main(Native Method)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): Caused by: java.lang.ClassNotFoundException: com.android.HelloLinearLayouts.HelloFormStuff2Activity in loader dalvik.system.PathClassLoader[/data/app/com.android.HelloLinearLayouts-1.apk]
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
08-10 09:30:16.024: ERROR/AndroidRuntime(277): ... 11 more
08-10 09:30:16.117: WARN/ActivityManager(58): Force finishing activity com.android.HelloLinearLayouts/.HelloFormStuff2Activity
08-10 09:30:16.355: INFO/ARMAssembler(58): generated scanline__00000077:03515104_00000000_00000000 [ 33 ipp] (47 ins) at [0x3266a0:0x32675c] in 338074 ns
08-10 09:30:16.655: WARN/ActivityManager(58): Activity pause timeout for HistoryRecord{44f9f440 com.android.HelloLinearLayouts/.HelloFormStuff2Activity}
08-10 09:30:27.147: WARN/ActivityManager(58): Activity destroy timeout for HistoryRecord{44f9f440 com.android.HelloLinearLayouts/.HelloFormStuff2Activity}
08-10 09:35:06.196: DEBUG/SntpClient(58): request time failed: java.net.SocketException: Address family not supported by protocol
08-10 09:35:16.209: INFO/Process(277): Sending signal. PID: 277 SIG: 9
08-10 09:35:16.235: INFO/ActivityManager(58): Process com.android.HelloLinearLayouts (pid 277) has died.
08-10 09:35:16.385: WARN/InputManagerService(58): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#450655e0
You could start off by looking at the LogCat view and determining what caused the app crash. If you still cannot figure it out, please post the logcat contents here.

android database leak found IllegalStateException

04-20 16:53:39.010: ERROR/Database(419): Leak found
04-20 16:53:39.010: ERROR/Database(419): java.lang.IllegalStateException: mPrograms size 1
04-20 16:53:39.010: ERROR/Database(419): at android.database.sqlite.SQLiteDatabase.finalize(SQLiteDatabase.java:1668)
04-20 16:53:39.010: ERROR/Database(419): at dalvik.system.NativeStart.run(Native Method)
04-20 16:53:39.010: ERROR/Database(419): Caused by: java.lang.IllegalStateException: /data/data/com.example.search/databases/rlite.db SQLiteDatabase created and never closed
04-20 16:53:39.010: ERROR/Database(419): at android.database.sqlite.SQLiteDatabase.<init>(SQLiteDatabase.java:1694)
04-20 16:53:39.010: ERROR/Database(419): at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:738)
04-20 16:53:39.010: ERROR/Database(419): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:760)
04-20 16:53:39.010: ERROR/Database(419): at android.database.sqlite.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:753)
04-20 16:53:39.010: ERROR/Database(419): at android.app.ApplicationContext.openOrCreateDatabase(ApplicationContext.java:473)
04-20 16:53:39.010: ERROR/Database(419): at android.content.ContextWrapper.openOrCreateDatabase(ContextWrapper.java:193)
04-20 16:53:39.010: ERROR/Database(419): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:98)
04-20 16:53:39.010: ERROR/Database(419): at com.example.search.Database.<init>(Database.java:33)
04-20 16:53:39.010: ERROR/Database(419): at com.example.search.JobDetails.applyJob(JobDetails.java:120)
04-20 16:53:39.010: ERROR/Database(419): at com.example.search.JobDetails.jobdetailsAction(JobDetails.java:98)
04-20 16:53:39.010: ERROR/Database(419): at java.lang.reflect.Method.invokeNative(Native Method)
04-20 16:53:39.010: ERROR/Database(419): at java.lang.reflect.Method.invoke(Method.java:521)
04-20 16:53:39.010: ERROR/Database(419): at android.view.View$1.onClick(View.java:2026)
04-20 16:53:39.010: ERROR/Database(419): at android.view.View.performClick(View.java:2364)
04-20 16:53:39.010: ERROR/Database(419): at android.view.View.onTouchEvent(View.java:4179)
04-20 16:53:39.010: ERROR/Database(419): at android.widget.TextView.onTouchEvent(TextView.java:6540)
04-20 16:53:39.010: ERROR/Database(419): at android.view.View.dispatchTouchEvent(View.java:3709)
04-20 16:53:39.010: ERROR/Database(419): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-20 16:53:39.010: ERROR/Database(419): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-20 16:53:39.010: ERROR/Database(419): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-20 16:53:39.010: ERROR/Database(419): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-20 16:53:39.010: ERROR/Database(419): at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
04-20 16:53:39.010: ERROR/Database(419): at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
04-20 16:53:39.010: ERROR/Database(419): at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1107)
04-20 16:53:39.010: ERROR/Database(419): at android.app.Activity.dispatchTouchEvent(Activity.java:2061)
04-20 16:53:39.010: ERROR/Database(419): at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
04-20 16:53:39.010: ERROR/Database(419): at android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
04-20 16:53:39.010: ERROR/Database(419): at android.os.Handler.dispatchMessage(Handler.java:99)
04-20 16:53:39.010: ERROR/Database(419): at android.os.Looper.loop(Looper.java:123)
04-20 16:53:39.010: ERROR/Database(419): at android.app.ActivityThread.main(ActivityThread.java:4363)
04-20 16:53:39.010: ERROR/Database(419): at java.lang.reflect.Method.invokeNative(Native Method)
04-20 16:53:39.010: ERROR/Database(419): at java.lang.reflect.Method.invoke(Method.java:521)
04-20 16:53:39.010: ERROR/Database(419): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
04-20 16:53:39.010: ERROR/Database(419): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
04-20 16:53:39.010: ERROR/Database(419): at dalvik.system.NativeStart.main(Native Method)
when i read the database show error like this. please do reply me
The important line is...
... Caused by: java.lang.IllegalStateException: /data/data/com.example.search/databases/rlite.db SQLiteDatabase created and never closed
Chances are you are allowing your activity to be stopped/exited before you are closing the database. (This can happen if you are not implementing all the (onXXX() methods) in the lifecycle. They can be triggered unexpectedly eg if you rotate the device.
Either write your db access routines as
db.open()
db.dosomething()
db.close()
or make sure you close the database when you get an onSuspend() (I think.. possibly one of the others) and re-open it when you are started again.
Hope this helps
Peter

Categories

Resources