2017-07-30 102 views
0

這是我的build.gradleresValue不產生資源發現在給定的名字相匹配

buildTypes { 
     debug { 
      resValue "string", "facebook_app_id", "\"XXXXXXXXX\"" 
     } 
     live{ 
      resValue "string", "facebook_app_id", "\"XXXXXXXXX\"" 
     } 
} 

,並在那裏我用facebook_app_id這是我的清單文件

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

這在調試工作正常,但生成一個簽名的apk時,這個錯誤產生的

沒有資源發現在給定的名字相匹配(在「值」,值爲「@字符串/ facebook_app_id」)。

回答

1

轉到 - >水庫 - >值 - > string.xml打開該文件,並寫入

<string name="facebook_app_id">Facebook</string> 
相關問題