我正在从DBM下载订单项,修改它们并将它们再次上传到DBM。上传后,如果我再次下载并查看,我将无法看到修改。代码中没有错误,API也没有返回任何FATAL EXCEPTION: main Process: com.computergr.contacts, PID: 15356
java.lang.NullPointerException: Attempt to invoke virtual method
'void com.computergr.contacts.model.SettingsGameCursorAdapter.notifyDataSetChanged()' on a null object reference
at com.computergr.contacts.Settings$7.onClick(Settings.java:354)
at android.support.v7.app.AlertController$ButtonHandler.handleMessage(AlertController.java:157)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
。
上传订单项的代码:
errorStatus
下载订单项的代码:
service = build('doubleclickbidmanager', config.Version, http=credentials.authorize(httplib2.Http()))
request = service.lineitems().uploadlineitems(body=BODY)
response = request.execute()
if 'uploadStatus' in response and 'errors' in response['uploadStatus']:
for error in response['uploadStatus']['errors']:
logging.error(error)
这是检查订单项是否已修改的正确方法,还是我做错了什么?有没有其他方法可以检查它?
答案 0 :(得分:0)
请注意,api会在以下情况下更新订单项:
- 基于任何标志,如果为该行设置了标志,它将更新
- 所有行都将获得更新
请参阅此链接:https://developers.google.com/bid-manager/guides/entity-write/format-对于那些可写值为yes的列只能更新