My android app runs fine, ads appear and work correctly etc, on the emulator and when I test it on phones using eclipse adt, but when it's downloaded from the play store it crashes immediately giving the logcat output:
09-28 18:50:21.280: E/AndroidRuntime(17895): FATAL EXCEPTION: main
09-28 18:50:21.280: E/AndroidRuntime(17895): Process: com.jakebarnby.pop, PID: 17895
09-28 18:50:21.280: E/AndroidRuntime(17895): java.lang.AssertionError
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.i.b.a.bf.<init>(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.i.b.a.as.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.i.j.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.i.b.a.q.<init>(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.i.b.a.p.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.i.b.a.p.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.i.b.a.p.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.i.j.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.i.j.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.i.j.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.i.j.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.i.j.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.o.b(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.o.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.startapp.android.publish.o.a(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at jakebarnby.pop.MainActivity.onCreate(Unknown Source)
09-28 18:50:21.280: E/AndroidRuntime(17895): at android.app.Activity.performCreate(Activity.java:5312)
09-28 18:50:21.280: E/AndroidRuntime(17895): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
09-28 18:50:21.280: E/AndroidRuntime(17895): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2181)
09-28 18:50:21.280: E/AndroidRuntime(17895): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2276)
09-28 18:50:21.280: E/AndroidRuntime(17895): at android.app.ActivityThread.access$800(ActivityThread.java:144)
09-28 18:50:21.280: E/AndroidRuntime(17895): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
09-28 18:50:21.280: E/AndroidRuntime(17895): at android.os.Handler.dispatchMessage(Handler.java:102)
09-28 18:50:21.280: E/AndroidRuntime(17895): at android.os.Looper.loop(Looper.java:136)
09-28 18:50:21.280: E/AndroidRuntime(17895): at android.app.ActivityThread.main(ActivityThread.java:5146)
09-28 18:50:21.280: E/AndroidRuntime(17895): at java.lang.reflect.Method.invokeNative(Native Method)
09-28 18:50:21.280: E/AndroidRuntime(17895): at java.lang.reflect.Method.invoke(Method.java:515)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796)
09-28 18:50:21.280: E/AndroidRuntime(17895): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
09-28 18:50:21.280: E/AndroidRuntime(17895): at dalvik.system.NativeStart.main(Native Method)
and I have no idea why. Any help would be greatly appreciated
Does your proguard enabled? If it is, you have to add obfustication code of startapp. It is written their documentation. Here is the link. And codes are copied from there.
-keep class com.startapp.** {
*;
}
-keepattributes Exceptions, InnerClasses, Signature, Deprecated, SourceFile,
LineNumberTable, *Annotation*, EnclosingMethod
-dontwarn android.webkit.JavascriptInterface
-dontwarn com.startapp.**
Related
I am writing a sample program in which i am using Youtube API, and it works fine, but I noticed that application crashes every time I try to play a video with enabled ads.
Log:
FATAL EXCEPTION: main
java.lang.IllegalStateException: android.os.DeadObjectException
at com.google.android.youtube.api.jar.client.RemoteEmbeddedPlayer.a(SourceFile:516)
at com.google.android.apps.youtube.api.jar.a.a.a(SourceFile:485)
at com.google.android.youtube.player.internal.h.onTransact(SourceFile:413)
at android.os.Binder.transact(Binder.java:326)
at com.google.android.youtube.player.internal.d$a$a.a(Unknown Source)
at com.google.android.youtube.player.internal.s.a(Unknown Source)
at com.google.android.youtube.player.YouTubePlayerView.a(Unknown Source)
at com.google.android.youtube.player.YouTubePlayerView$1.a(Unknown Source)
at com.google.android.youtube.player.internal.r.g(Unknown Source)
at com.google.android.youtube.player.internal.r$c.a(Unknown Source)
at com.google.android.youtube.player.internal.r$b.a(Unknown Source)
at com.google.android.youtube.player.internal.r$a.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4921)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1036)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:803)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.os.DeadObjectException
at android.os.BinderProxy.transact(Native Method)
at com.google.android.apps.youtube.api.b.a.aq.a(SourceFile:706)
at com.google.android.youtube.api.jar.client.RemoteEmbeddedPlayer.a(SourceFile:513)
few Questions:
How can i resolve this issue ?
Is it possible to block the ad on Youtube Player API ?
If the app runs visible,everything gets fine.But if I press home to let the app in the background and do some other things, it would get a crash like this:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.qdn.bus/com.qdn.activity.MainActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2001)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2028)
at android.app.ActivityThread.access$600(ActivityThread.java:127)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1179)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4508)
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:809)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at android.view.View.onRestoreInstanceState(View.java:9999)
at android.support.v4.view.ViewPager.onRestoreInstanceState(Unknown Source)
at android.view.View.dispatchRestoreInstanceState(View.java:9975)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2397)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.View.restoreHierarchyState(View.java:9951)
at android.support.v4.app.Fragment.restoreViewState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(Unknown Source)
at android.support.v4.app.FragmentActivity.onStart(Unknown Source)
at com.qdn.activity.MainActivity.onStart(Unknown Source)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1136)
at com.lbe.security.service.core.client.b.x.callActivityOnStart(Unknown Source)
at android.app.Activity.performStart(Activity.java:4489)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
... 11 more
java.lang.NullPointerException
at android.view.View.onRestoreInstanceState(View.java:9999)
at android.support.v4.view.ViewPager.onRestoreInstanceState(Unknown Source)
at android.view.View.dispatchRestoreInstanceState(View.java:9975)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2397)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:2408)
at android.view.View.restoreHierarchyState(View.java:9951)
at android.support.v4.app.Fragment.restoreViewState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(Unknown Source)
at android.support.v4.app.FragmentActivity.onStart(Unknown Source)
at com.qdn.activity.MainActivity.onStart(Unknown Source)
at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1136)
at com.lbe.security.service.core.client.b.x.callActivityOnStart(Unknown Source)
at android.app.Activity.performStart(Activity.java:4489)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2028)
at android.app.ActivityThread.access$600(ActivityThread.java:127)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1179)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4508)
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:809)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
at dalvik.system.NativeStart.main(Native Method)
I think it is because the Delvik Vm has recycle some of the memory.But is there anyway to fix it?
I am running 4 background tasks in a activity. But I was getting an error in one activity at
pDialog.show(). I am unable understand the. For some activities I got the same problem but I removed the progress dialog because those are medium priority but this one I need High priority. Here is my error. Can any tell me how to solve this error.
09-28 19:44:53.575: I/Choreographer(1120): Skipped 86 frames! The application may be doing too much work on its main thread.
09-28 19:44:54.374: E/WindowManager(1120): Activity com.example.newairways.Gscan has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{40d40860 V.E..... R.....ID 0,0-684,192} that was originally added here
09-28 19:44:54.374: E/WindowManager(1120): android.view.WindowLeaked: Activity com.example.newairways.Gscan has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{40d40860 V.E..... R.....ID 0,0-684,192} that was originally added here
09-28 19:44:54.374: E/WindowManager(1120): at android.view.ViewRootImpl.<init>(ViewRootImpl.java:354)
09-28 19:44:54.374: E/WindowManager(1120): at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:216)
09-28 19:44:54.374: E/WindowManager(1120): at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
09-28 19:44:54.374: E/WindowManager(1120): at android.app.Dialog.show(Dialog.java:281)
09-28 19:44:54.374: E/WindowManager(1120): at com.example.newairways.Gscan$insert.onPreExecute(Gscan.java:304)
09-28 19:44:54.374: E/WindowManager(1120): at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:586)
09-28 19:44:54.374: E/WindowManager(1120): at android.os.AsyncTask.execute(AsyncTask.java:534)
09-28 19:44:54.374: E/WindowManager(1120): at com.example.newairways.Gscan$1.onClick(Gscan.java:201)
09-28 19:44:54.374: E/WindowManager(1120): at android.view.View.performClick(View.java:4204)
09-28 19:44:54.374: E/WindowManager(1120): at android.view.View$PerformClick.run(View.java:17355)
09-28 19:44:54.374: E/WindowManager(1120): at android.os.Handler.handleCallback(Handler.java:725)
09-28 19:44:54.374: E/WindowManager(1120): at android.os.Handler.dispatchMessage(Handler.java:92)
09-28 19:44:54.374: E/WindowManager(1120): at android.os.Looper.loop(Looper.java:137)
09-28 19:44:54.374: E/WindowManager(1120): at android.app.ActivityThread.main(ActivityThread.java:5041)
09-28 19:44:54.374: E/WindowManager(1120): at java.lang.reflect.Method.invokeNative(Native Method)
09-28 19:44:54.374: E/WindowManager(1120): at java.lang.reflect.Method.invoke(Method.java:511)
09-28 19:44:54.374: E/WindowManager(1120): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
09-28 19:44:54.374: E/WindowManager(1120): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
09-28 19:44:54.374: E/WindowManager(1120): at dalvik.system.NativeStart.main(Native Method)
09-28 19:44:57.234: E/Trace(1146): error opening trace file: No such file or directory (2)
Use a Handler to show dialog if you are using AsyncTask or Thread in your program. And if the problem still exists, please try posting your code for further help :)
All progress dialogs should be closed before exiting an activity.
You have probably forgotten to close your progressDialog.
Close it in your onPostExecute() method
pDialog.dismiss();
Check out this SO link for more clarifation on windowleaked error.
I'm having this error with my sqlite code but I don't know what to make of it because I am a beginner. Here is my logcat, any help would be appreciated. I can paste more code if you want.
My application just adds a contact to a database.
09-28 06:21:51.772: E/SQLiteLog(1564): (1) near "number": syntax error
09-28 06:21:51.803: E/SQLiteDatabase(1564): Error inserting mobile number=1233456 work address= home number=7658678 home address=123 Fake Street first name=John email address=jsmith#gmail.com last name=Smith work number=54372 notes=
09-28 06:21:51.803: E/SQLiteDatabase(1564): android.database.sqlite.SQLiteException: near "number": syntax error (code 1): , while compiling: INSERT INTO contacts(mobile number,work address,home number,home address,first name,email address,last name,work number,notes) VALUES (?,?,?,?,?,?,?,?,?)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:889)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:500)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1467)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1339)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at com.example.contactmanager.DatabaseHandler.addContact(DatabaseHandler.java:80)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at com.example.contactmanager.NewContactActivity$1.onClick(NewContactActivity.java:63)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.view.View.performClick(View.java:4240)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.view.View$PerformClick.run(View.java:17721)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.os.Handler.handleCallback(Handler.java:730)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.os.Handler.dispatchMessage(Handler.java:92)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.os.Looper.loop(Looper.java:137)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at android.app.ActivityThread.main(ActivityThread.java:5103)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at java.lang.reflect.Method.invokeNative(Native Method)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at java.lang.reflect.Method.invoke(Method.java:525)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
09-28 06:21:51.803: E/SQLiteDatabase(1564): at dalvik.system.NativeStart.main(Native Method)
I'm not looking for a very specific answer I just want to know where I should be looking to fix this problem. Thanks
EDIT: I put the underscores but now the error is saying there is no home address column in table contacts.
instead of mobile number its better if you give your field name as mobile_number (don't give the space). There might be possibilities where mobile and number can be considered as two separate fields.
Wen i install my apk file on android device and after installation wen i hit the open button my application does not start and shows force close.
The logcat output of my application is shown below :
09-28 12:14:57.651: INFO/ActivityManager(124): Starting activity: Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=com.biz.mlm/.SplashScreen }
09-28 12:14:57.660: WARN/ActivityManager(124): Permission Denial: starting Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=com.biz.mlm/.SplashScreen } from ProcessRecord{44ffa660 1130:com.android.packageinstaller/10026} (pid=1130, uid=10026) requires android.permission.WRITE_CONTACTS
09-28 12:14:57.672: DEBUG/AndroidRuntime(1130): Shutting down VM
09-28 12:14:57.672: WARN/dalvikvm(1130): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): FATAL EXCEPTION: main
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN flg=0x10000000 cmp=com.biz.mlm/.SplashScreen } from ProcessRecord{44ffa660 1130:com.android.packageinstaller/10026} (pid=1130, uid=10026) requires android.permission.WRITE_CONTACTS
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at android.os.Parcel.readException(Parcel.java:1247)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at android.os.Parcel.readException(Parcel.java:1235)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1298)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1373)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at android.app.Activity.startActivityForResult(Activity.java:2817)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at android.app.Activity.startActivity(Activity.java:2923)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at com.android.packageinstaller.InstallAppProgress.onClick(InstallAppProgress.java:224)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at android.view.View.performClick(View.java:2408)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at android.view.View$PerformClick.run(View.java:8816)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at android.os.Handler.handleCallback(Handler.java:587)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at android.os.Handler.dispatchMessage(Handler.java:92)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at android.os.Looper.loop(Looper.java:123)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at android.app.ActivityThread.main(ActivityThread.java:4627)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at java.lang.reflect.Method.invokeNative(Native Method)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at java.lang.reflect.Method.invoke(Method.java:521)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-28 12:14:57.700: ERROR/AndroidRuntime(1130): at dalvik.system.NativeStart.main(Native Method)
09-28 12:14:57.740: WARN/ActivityManager(124): Force finishing activity com.android.packageinstaller/.InstallAppProgress
Please help me by guiding me about what I have done wrong
EDIT :
The permissions in my manifest are :
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<!-- <uses-permission android:name="android.permission.INSTALL_PACKAGES"/> -->
<application android:icon="#drawable/biz_logo"
android:permission="android.permission.WRITE_CONTACTS">
After this also it is behaving same
Looks like you need to add the permission
android.permission.WRITE_CONTACTS
to your manifest file.
Barry
The logcat output has everything you need to know :-)
Your app basically is writing contacts but it does not have permissions to do so (in Android, applications need to be given permissions explicitly for various operations).
Edit the file AndroidManifest.xml to include the following line/XML element:
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
within the
<manifest>
XML element, and then rebuild, reinstall and rerun.
For more information, take a look here: http://developer.android.com/guide/topics/manifest/uses-permission-element.html
yes i rebuilt it.my mistake was i have written in manifest <uses-permission android:name="android.permission.WRITE_CONTACTS" /> and also inside the application tag like this
<application android:icon="#drawable/logo"
android:permission="android.permission.WRITE_CONTACTS">
so i was getting force close.
This permission should be written only once in the manifest file