Android异常总结---1.异常原因: java.lang.IllegalArgumentException: URI: content://com.android.contacts/con
1.异常原因:
java.lang.IllegalArgumentException: URI:
content://com.android.contacts/contacts1/data, calling user:
com.credream.contact, calling package:com.credream.contact
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:144)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:114)
at android.content.ContentProviderProxy.bulkQueryInternal
(ContentProviderNative.java:330) www.zzzyk.com
at android.content.ContentProviderProxy.query(ContentProviderNative.java:366)
at android.content.ContentResolver.query(ContentResolver.java:245)
at com.credream.contact.ContactTest.testContact(ContactTest.java:56)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at android.test.InstrumentationTestRunner.onStart
(InstrumentationTestRunner.java:520)
at android.app.Instrumentation$InstrumentationThread.run
(Instrumentation.java:1447)
-------------------------------------
原因由于:uri=Uri.parse("content://com.android.contacts/contacts"+contactid+"/data");
uri出错,正确写的应该是这样的:
uri=Uri.parse("content://com.android.contacts/contacts/"+contactid+"/data");
补充:移动开发 , Android ,