Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/212.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Google Translate v2 API访问出现错误403_Android_Api_Google Translate - Fatal编程技术网

Android Google Translate v2 API访问出现错误403

Android Google Translate v2 API访问出现错误403,android,api,google-translate,Android,Api,Google Translate,我正在尝试通过Android应用程序访问谷歌的翻译服务。但是,每次尝试访问服务时(使用HttpGet请求),我都会遇到以下错误: { "error": { "errors": [ { "domain": "usageLimits", "reason": "accessNotConfigured", "message": "Access Not Configured. Please use Google Developers Console to activat

我正在尝试通过Android应用程序访问谷歌的翻译服务。但是,每次尝试访问服务时(使用
HttpGet
请求),我都会遇到以下错误:

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
   }
  ],
  "code": 403,
  "message": "Access Not Configured. Please use Google Developers Console to activate the API for your project."
 }
}  
我无法解决上述错误。我已按如下方式设置该项目:
1.在Google开发者控制台上,创建了一个新项目。
2.从左侧的“API和身份验证”部分,激活翻译API v2。
3.使用debug.keystore生成SHA1密钥,并在开发人员控制台上使用此信息生成新密钥。
4.添加了帐单信息。信用卡已被接受。
5.使用以下链接访问翻译API:
https://www.googleapis.com/language/translate/v2?key=myKey&source=en&target=hi&q=hell

每次应用程序运行上述Get请求时,都会返回403错误。我已经通过了所有的链接,所以或谷歌可以关心扔在这个问题上,似乎没有任何影响它


你知道我哪里出错了吗?

因为你用android应用程序(软件包名称和SHA证书)限制了你的api密钥,所以你必须将这些信息包含在发送到谷歌的每个请求的标题中


.

对此不确定,但
debug.keystore
可能是错误的。您通常希望使用发布密钥进行设置,因为这是您发布的应用程序用于验证的密钥。@Sriram您能解决这个问题吗?@AhmedZ.:不,不走运。@Sriram ohhh非常大的一个。。。