【问题标题】:No resource found that matches the given name (at 'value'with value '@string/facebook_app_id')找不到与给定名称匹配的资源(在“值”处,值为“@string/facebook_app_id”)
【发布时间】:2015-03-17 18:03:18
【问题描述】:

我正在尝试将 facebook 添加到我的应用程序中,并且我正在按照他们告诉我的方式执行这些步骤(我正在执行 Eclipse 设置):

https://developers.facebook.com/docs/android/getting-started?locale=es_LA#eclipse

但我的 AndroidManifest.xml 在这一行出现错误:

<meta-data android:value="@string/facebook_app_id" android:name="com.facebook.sdk.ApplicationId"/>

错误提示:错误:未找到与给定名称匹配的资源(在 'value' 处,值为 '@string/facebook_app_id')

【问题讨论】:

  • facebook_app_id 是否存在于您的 string.xml 中
  • 您应该在您的 string.xml 文件中添加 facebook_app_id。
  • @MoubeenFarooqWarar 它的添加就像图片上的教程一样。 @string/facebook_app_id
  • 看看我的回答

标签: java android eclipse facebook


【解决方案1】:

在 values/string.xml 中添加这一行(在资源标签之间)

<string name="facebook_app_id">Facebook</string>

【讨论】:

  • 错误已修复,谢谢...奇怪的是他们在教程中有这样的内容。我想知道是否每个人都会遇到同样的错误。
  • 其实android教程一般都是从解释这些文件开始的。也许你想走得太快。请记住,@string 指的是该文件中的变量。 :)
【解决方案2】:

goto -> res->values->string.xml 打开该文件并写入

 <string name="facebook_app_id">Facebook</string>

【讨论】:

  • 其他人在您的答案之前领先了几分钟:P
  • 没有问题,但请看我的评论,我是第一个发现问题的人
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-09-28
相关资源
最近更新 更多