应用程序名称未设置。调用Builder#setApplicationName。错误 [英] Application name is not set. Call Builder#setApplicationName. error

查看:791
本文介绍了应用程序名称未设置。调用Builder#setApplicationName。错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

应用程序:使用BigQuery API连接到BigQuery API
环境:Eclipse,Windows 7



我的应用程序运行良好,直到昨晚。我没有做任何改变(除了重新启动我的电脑),我的代码突然给我这个错误:

 应用程序名称是没有设置。调用Builder#setApplicationName。 

谢天谢地,我昨晚从我的工作空间中获得了tar'd版本。我跑了一个文件夹比较,发现local_db.bin文件是不同的。我删除了现有的local_db.bin文件,并试图再次运行该程序。它工作得很好!



任何想法为什么会发生这种情况?

希望这可以帮助任何绊倒这个问题的人。

解决方案

试试这个来设置你的应用程序名称

  Drive service = new Drive.Builder(httpTransport,jsonFactory,null)
.setHttpRequestInitializer(凭证)
.setApplicationName(您的应用程序名称)
.build() ;


Application: Connecting to BigQuery using BigQuery APIs for Java Environment: Eclipse, Windows 7

My application was running fine until last night. I've made no changes (except for restarting my computer) and my code is suddenly giving me this error:

Application name is not set. Call Builder#setApplicationName.

Thankfully I had a tar'd version of my workspace from last night. I ran a folder compare and found the local_db.bin file was different. I deleted the existing local_db.bin file and tried to run the program again. And it worked fine!

Any idea why this might have happened?

Hopefully this will help anyone else who stumbles upon this issue.

解决方案

Try this to set your application name

Drive service = new Drive.Builder(httpTransport, jsonFactory, null)
                  .setHttpRequestInitializer(credential)
                  .setApplicationName("Your app name")
                  .build();

这篇关于应用程序名称未设置。调用Builder#setApplicationName。错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆