【发布时间】:2014-10-02 01:01:22
【问题描述】:
我用的是Android Studio,代码:
ArrayList<ContentProviderOperation> ops = new ArrayList<ContentProviderOperation>();
ops.add(ContentProviderOperation.newInsert(
ContactsContract.RawContacts.CONTENT_URI)
.withValues(ContactsContract.RawContacts.ACCOUNT_TYPE, null)
.withValues(ContactsContract.RawContacts.ACCOUNT_NAME, null)
.build());
错误:
Error:(535, 17) error: method withValues in class Builder cannot be applied to given types;
required: ContentValues
found: String,<null>
reason: actual and formal argument lists differ in length
截图:
【问题讨论】: