我在 GO 中開發了一個 appengine 應用程序,現在我嘗試使用 androidpublisher api。為此,我需要許多依賴項,例如:github.com/google/google-api-go-clientgithub.com/golang/oauth2google.golang.org/appenginegoogle.golang.org/appengine/urlfetch我嘗試根據https://github.com/golang/oauth2中的示例為 google-api-go-client 設置 oauth2 身份驗證一切看起來都很好,但我不能再在我的 Windows 開發機器上運行應用服務器了。它抱怨文件名太長:INFO 2016-08-20 22:48:03,786 devappserver2.py:769] Skipping SDK update check. INFO 2016-08-20 22:48:03,960 api_server.py:205] Starting API server at: http://localhost:64053 INFO 2016-08-20 22:48:03,969 dispatcher.py:197] Starting module "default" running at: http://localhost:8080 INFO 2016-08-20 22:48:03,974 admin_server.py:116] Starting admin server at:http://localhost:8000Exception in thread Instance Adjustment: Traceback (most recent call last): File "C:\Python27\lib\threading.py", line 801, in __bootstrap_inner self.run() File "C:\Python27\lib\threading.py", line 754, in run self.__target(*self.__args, **self.__kwargs) File "C:\work\go_appengine\google\appengine\tools\devappserver2\module.py",line 1485, in _loop_adjusting_instances self._adjust_instances() File "C:\work\go_appengine\google\appengine\tools\devappserver2\module.py",line 1460, in _adjust_instances self._add_instance(permit_warmup=True) File "C:\work\go_appengine\google\appengine\tools\devappserver2\module.py",line 1338, in _add_instance expect_ready_request=perform_warmup) File "C:\work\go_appengine\google\appengine\tools\devappserver2\go_runtime.py",line 174, in new_instance if self._go_application.maybe_build(self._modified_since_last_build): File "C:\work\go_appengine\google\appengine\tools\devappserver2\go_application.py",line 304, in maybe_build self._extras_hash, old_extras_hash = (self._get_extras_hash(), 我認為我GOPATH的設置錯誤,所以他將所有 gofile 作為go-app-builder.exe.我的項目就在C:\Users\me\project\gopath 指向的地方,并且當我輸入時我站著:goapp.bat serve .有人可以幫助解決這個問題嗎?謝謝你。
1 回答

精慕HU
TA貢獻1845條經驗 獲得超8個贊
我通過設置我的 GOPATH 解決了這個問題。
現在是這樣設置的:
GOPATH=C:\Users\me\development\appengine\gopath;C:\Users\me\project
現在一切正常,上傳的文件現在要小得多。2MB 與 11MB。
謝謝你的提示。
- 1 回答
- 0 關注
- 217 瀏覽
添加回答
舉報
0/150
提交
取消