0
檢查器FaceBookSettings中的「調試Android密鑰散列」不起作用(Windows7),因爲它使用了不正確的DebugKeyStorePath。這是因爲驅動器(「C:\」)未包含在HOMEPATH中。不正確的DebugKeyStorePath
只有System.Environment.GetEnvironmentVariable("HOMEPATH")
用於構建路徑,該路徑不包含驅動器。對於完整路徑,應在路徑前添加System.Environment.GetEnvironmentVariable("HOMEDRIVE")
。
直到現在我手動修改FacebookAndroidUtil.cs每個SDK更新後解決這個問題:
private static string DebugKeyStorePath
{
get
{
return (Application.platform == RuntimePlatform.WindowsEditor) ?
System.Environment.GetEnvironmentVariable("HOMEDRIVE") + //FIX PATH!!!
System.Environment.GetEnvironmentVariable("HOMEPATH") +
@"\.android\debug.keystore" :
System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal) +
@"/.android/debug.keystore";
}
}
我沒有檢查,如果它是固定在SDK 5.1測試版,因爲目前的鏈接下載FacebookSDK-140101-β和而不是FacebookSDK-140401-beta(可能只是一個錯誤的文件名,但爲了確保我現在跳過該更新)。