我找到了一些话题,但他们没有帮助我解决我的问题。我想删除我的草稿短信。多次尝试使用此 uri:
contentResolver.delete("content://sms/draft", " ", null); //this is line 173
它抛出了这个异常:
09-09 00:43:43.454: E/AndroidRuntime(2933): Caused by: java.lang.IllegalArgumentException: Unknown URL
09-09 00:43:43.454: E/AndroidRuntime(2933): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java)
09-09 00:43:43.454: E/AndroidRuntime(2933): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java)
09-09 00:43:43.454: E/AndroidRuntime(2933): at android.content.ContentProviderProxy.delete(ContentProviderNative.java)
09-09 00:43:43.454: E/AndroidRuntime(2933): at android.content.ContentResolver.delete(ContentResolver.java)
09-09 00:43:43.454: E/AndroidRuntime(2933): at com.haanz.smsbackup.SmsProvider.query(SmsProvider.java:173)
09-09 00:43:43.454: E/AndroidRuntime(2933): at android.content.ContentProvider.query(ContentProvider.java)
09-09 00:43:43.454: E/AndroidRuntime(2933): at android.content.ContentProvider$Transport.query(ContentProvider.java)
09-09 00:43:43.454: E/AndroidRuntime(2933): at android.content.ContentResolver.query(ContentResolver.java)
09-09 00:43:43.454: E/AndroidRuntime(2933): at android.content.ContentResolver.query(ContentResolver.java)
有人请告诉我我哪里做错了吗?